CLANG-REORDER-FIELDS(1)
β¨ 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-hiddenfor 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-hiddenfor 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-orderis 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
- debian trixie: clang-tools-18 1:18.1.8-18+b1 Β· APACHE-2-LLVM-EXCEPTIONS
- ubuntu questing: clang-tools-18 1:18.1.8-18ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms