CLANG-REORDER-FIELDS(1)

πŸ“¦ version 12.0.1, in ubuntu jammy

πŸŽ€ NAME πŸŽ€

clang-reorder-fields β€” bestie, this is the manual page for clang-reorder-fields version 12, and she's here to shuffle your struct fields around like she's reorganizing her Pinterest boards πŸ’…


✨ DESCRIPTION ✨

🌸 OVERVIEW

OK so picture this: you've got a C/C++ struct or class and the fields are just... in an order. Any order. Chaos order. This tool reorders those fields for you. That's it, that's the whole vibe. A tool to reorder fields in C/C++ structs/classes. Periodt. πŸ¦‹

πŸ’œ USAGE

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

You hand her your options, then one or more source files β€” <source0> and friends all the way up to <sourceN> β€” and she does her thing. Slay. ✨

πŸ”₯ OPTIONS

⭐ Generic Options

These are the ones basically every clang tool has, the little universal besties:

  • --help β€” shows you all the available options. Want more? There's --help-hidden for more. πŸ‘€
  • --help-list β€” shows you the list of available options. And yep, there's a --help-list-hidden for more of those too.
  • --version β€” tells you the version of this program. Identity check, who is she πŸ’–

πŸ‘‘ clang-reorder-fields options

Now the main character options, the ones that are actually hers:

  • --extra-arg=<string> β€” an extra argument that gets appended to the compiler command line. Sneak it in at the end, no cap.
  • --extra-arg-before=<string> β€” an extra argument that gets prepended to the compiler command line. This one goes first, like she's cutting the line πŸ™ˆ
  • --fields-order=<string> β€” the desired fields order. This is literally the whole point, bestie. Tell her the order you want. πŸ“
  • -i β€” overwrite edited files. She edits them in place. Fr fr, no backup, she just goes for it. 😭
  • -p=<string> β€” build path.
  • --record-name=<string> β€” the name of the struct/class. Gotta tell her which one you're talking about, iykyk 🌈
Heads up bestie: -i overwrites your edited files directly. No undo button, no "are you sure", just main character energy. Be sure before you commit to the bit πŸ’€

And that's the whole page, gorgeous. This was clang-reorder-fields version 12, from February 2022 β€” go forth and reorder those fields, you absolute icon 🫢🌸✨

πŸ“¦ where this page comes from