CLANG-REORDER-FIELDS(1)

πŸ“¦
version 13.0.1 Β· 3 versions
, in ubuntu jammy

πŸŽ€ NAME πŸŽ€

ok so bestie, this is clang-reorder-fields β€” it's the manual page for clang-reorder-fields version 13, and it's literally a whole tool whose entire personality is rearranging the fields inside your C/C++ structs and classes. iconic behavior honestly.


✨ DESCRIPTION ✨

OVERVIEW: A tool to reorder fields in C/C++ structs/classes. πŸ’–

like… that's it. that's the whole job. it takes your struct, you tell it what order you want the fields in, and it just does it. no drama, no fuss, main character energy fr fr.

USAGE:

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

so you pass it some options and then one or more source files <source0> all the way through <sourceN>, and it gets to work. slay. πŸ¦‹

🌸 OPTIONS 🌸

Generic Options 🫢

these are the universal ones, the "everyone gets them" options:

  • --help β€” shows you all the available options. and if you're feeling extra extra, --help-hidden shows even more. πŸ‘€
  • --help-list β€” prints out the list of available options. and yes bestie, there's a --help-list-hidden for more. 🌈
  • --version β€” tells you what version of this program you're running. a little "who am i" moment. πŸ’…

clang-reorder-fields options πŸ‘‘

these are the ones that actually do the thing:

  • --extra-arg=<string> β€” an extra argument to append to the compiler command line. (append = tack it on the end, bestie πŸŽ€)
  • --extra-arg-before=<string> β€” an extra argument to prepend to the compiler command line. (prepend = it goes at the very front, before everything else ✨)
  • --fields-order=<string> β€” the desired fields order. this is THE one, the moment, the reason we're all here. you tell it the order you want and it makes it happen. πŸ’–
  • -i β€” overwrite edited files. like, it edits your files in place. so. maybe know what you're doing first? πŸ™ˆ
  • -p=<string> β€” build path. 🌸
  • --record-name=<string> β€” the name of the struct/class. you gotta tell it which one you're messing with, obviously. πŸ‘‘
real talk: -i literally overwrites your edited files, so if you've got uncommitted vibes in there, that's on you. commit first, queen. πŸ’€

and that's the whole page, bestie! this manual page is for clang-reorder-fields 13, dated July 2023, and honestly? it ate. go forth and reorder those fields. periodt. πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from