CLANG-REORDER-FIELDS(1)

πŸ“¦
version 18.1.8 Β· 5 versions
, in debian trixie, ubuntu questing

✨ clang-reorder-fields ✨

okay bestie, listen up πŸ’– this is the manual page for clang-reorder-fields (that's version 18, from the User Commands corner of the manual-verse), and it's genuinely one of the most underrated little tools out there. no cap.


🌸 NAME 🌸

clang-reorder-fields β€” manual page for clang-reorder-fields 18


πŸ¦‹ DESCRIPTION πŸ¦‹

OVERVIEW: a tool to reorder fields in C/C++ structs/classes. that's it. that's the whole vibe. you got a struct with the fields in a messy order and you want them ✨rearranged✨ without dragging your own fingers through the diff? this is the girl for the job. iconic behaviour honestly.

USAGE:

clang-reorder-fields [options] <source0> [... <sourceN>]

OPTIONS:


πŸ’… Generic Options πŸ’…

these are the universal besties, they work on basically every tool in the family:

  • --help β€” Display available options (--help-hidden for more). so like, the normal help, but if you're feeling feral there's a hidden version with extra stuff in it πŸ‘€
  • --help-list β€” Display list of available options (--help-list-hidden for more). same energy, but it's giving "just the list, no commentary" πŸŽ€
  • --version β€” Display the version of this program. yes queen, tell me who you are πŸ’–

🧚 clang-reorder-fields options 🧚

this is the main character section, the one you actually came for:

  • --extra-arg=<string> β€” Additional argument to append to the compiler command line. just tacking it on at the end, no thoughts head empty 🫢
  • --extra-arg-before=<string> β€” Additional argument to prepend to the compiler command line. same thing but it goes in first, front of the line, VIP treatment πŸ’…
  • --fields-order=<string> β€” The desired fields order. this is literally the whole point of the tool, bestie. this is the order you want the fields to be in. 🌈
  • -i β€” Overwrite edited files. ⚠️ bestie be careful β€” this one goes in and rewrites your files in place. no undo button, no take-backs, no "wait I didn't mean that". back up first or commit first, fr fr 😭
  • -p <string> β€” Build path. that's the build directory, so the tool knows where to look πŸ‘‘
  • --record-name=<string> β€” The name of the struct/class. tell it which one you're messing with, because it cannot read your mind (yet) πŸ’€

lowkey the combo of --record-name + --fields-order is the whole ritual. everything else is just support cast. periodt. ✨

and that's the whole page, babe πŸŽ€ this was clang-reorder-fields 18, dated June 2025 β€” go forth, reorder those fields, and remember: with great -i comes great responsibility πŸ’–πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from