CLANG-REORDER-FIELDS(1)

πŸ“¦
version 19.1.7 Β· 5 versions
, in debian bookworm, debian trixie

πŸ’– clang-reorder-fields β€” the manual, but make it cute

okay bestie, so clang-reorder-fields is a User Command and this is literally its whole manual page, but with the ✨vibes✨ turned all the way up. it's version 19 btw. let's get into it 🫢


✨ NAME ✨

clang-reorder-fields β€” no cap, it's exactly what it sounds like: a tool that reorders fields in C/C++ structs/classes. iconic behavior honestly πŸ’…


🌸 DESCRIPTION 🌸

OVERVIEW: a tool to reorder fields in C/C++ structs/classes. that's the whole mission statement, and it ate. πŸ”₯

USAGE:

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

so you pass it one or more source files (<source0>, and then ... <sourceN> if you've got a whole squad of them), plus whatever options your heart desires. main character energy fr fr. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

okay so here's the thing β€” these options come in two little groups, and both are important. do not skip, bestie, we don't skip here. πŸ™ˆ

πŸ’œ Generic Options

the basics. the essentials. the "everyone gets these" girlies.

  • --help β€” displays the available options. and if you're feeling extra nosy, --help-hidden shows you even more. πŸ‘€
  • --help-list β€” displays a whole list of the available options. and yes, there's a --help-list-hidden for more, because of course there is. ✨
  • --version β€” displays the version of this program. (spoiler: it's 19, iykyk) πŸ¦‹

🌈 clang-reorder-fields options

the ones that make this tool this tool. the moment. the slay.

  • --extra-arg=<string> β€” an additional argument to append to the compiler command line. appending, not prepending β€” order matters, bestie. πŸ’…
  • --extra-arg-before=<string> β€” an additional argument to prepend to the compiler command line. yes, this one goes first. that's the whole difference and it's lowkey crucial. 🌸
  • --fields-order=<string> β€” the desired fields order. that's it. that's the vibe you're asking for. πŸŽ€
  • -i β€” overwrite edited files. in-place edits, no new files, straight up committed to the bit. πŸ”₯
  • -p <string> β€” build path. you point at where the build lives. 🧚
  • --record-name=<string> β€” the name of the struct/class. tell it which one you're messing with, girl. πŸ‘‘
⚠️ real talk though: these flags are doing actual compiler things. --extra-arg and --extra-arg-before literally change the compiler command line, and -i writes straight over your files. know what you're passing before you pass it. πŸ’€

πŸ’– SEE ALSO πŸ’–

nothing listed here in the original, bestie β€” this page is a solo act. πŸ’…


and that's the whole page!! written up as part of clang-reorder-fields 19, dated June 2025, and honestly? she served. go reorder some fields, you've got this. πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from