[clang] Sort attributes according to source position before printing (PR #162556)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 09:01:47 PDT 2025


AaronBallman wrote:

> @AaronBallman : curious of your thoughts.

I think we could either go with a one-off fix that's specific to `asm` (which closes the linked issue), or we could explore the more general solution of how to handle attributes with custom parsing logic. My gut feeling is that the general solution will be tricky to solve though; printing logic isn't trivial because you've got things like `constinit`, `asm`, calling conventions like `__cdecl`, oddities like `_Noreturn`, etc.

https://github.com/llvm/llvm-project/pull/162556


More information about the cfe-commits mailing list