CLANG-REORDER-FIELDS(1)

πŸ“¦
version 21.1.8 Β· 3 versions
, in ubuntu stonking

✨ NAME ✨

ok so bestie, this is the manual page for clang-reorder-fields β€” the little clang tool that ✨reorders fields✨ in your C/C++ structs and classes. she's version 21, she's iconic, she's here πŸ’…

🌸 DESCRIPTION 🌸

OVERVIEW: a tool to reorder fields in C/C++ structs/classes. that's it, that's the whole vibe β€” you tell it the order you want, it goes in and rearranges the fields for you. genuinely so satisfying πŸŽ€

USAGE:

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

so you pass in one or more source files β€” <source0> and then as many more as you want, all the way up to <sourceN> πŸ¦‹ β€” plus whatever options you're feeling.


πŸ‘‘ OPTIONS πŸ‘‘

πŸ’– Generic Options πŸ’–

these are the basics, the little starter pack, the everything-everywhere options:

  • --help β€” shows you all the available options. and if you're nosy (respectfully) there's --help-hidden for even more πŸ‘€
  • --help-list β€” prints out the list of available options. same deal: --help-list-hidden for the extra-secret ones πŸ™ˆ
  • --version β€” tells you which version of this program you're running. spoiler: it's 21 ⭐

πŸ¦‹ clang-reorder-fields options πŸ¦‹

the main-character options, the ones that actually do the reordering thing:

  • --extra-arg=<string> β€” an extra argument that gets appended to the compiler command line πŸ”₯
  • --extra-arg-before=<string> β€” an extra argument that gets prepended to the compiler command line πŸ”₯ (yes, the order difference is literally the whole point)
  • --fields-order=<string> β€” the desired fields order. this is the one, this is the moment, you type in the order you want and she delivers πŸ’…
  • -i β€” overwrite edited files. so like, she edits them in place. no backup copy, no undo button, no take-backsies 😭 (so maybe know what you're doing first, bestie)
  • -p <string> β€” build path πŸ“
  • --record-name=<string> β€” the name of the struct/class. you gotta tell her which one to reorganize, she's not a mind reader 🫢

and that's the whole page, no cap. slay, go reorder some fields, you absolute icon πŸ‘‘βœ¨

this manual page is for clang-reorder-fields version 21, dated September 2026 β€” mwah, kisses, see u next release πŸŽ€πŸ’–

πŸ“¦ where this page comes from