[clang] Sort attributes according to source position before printing (PR #162556)
Giuliano Belinassi via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 06:14:29 PDT 2025
giulianobelinassi wrote:
> Rather than sorting, can we figure out why our existing order isn't lexical? We made a few changes a few years ago with the intent of ensuring that these are in lexical order.
>
> We intentionally visit instantiations in that order, and we ensure we're creating them as best we can in that order.
>
> I DO find it.... mildly suspicious that only those handful of attributes/and OMP are involved here, so I'd like to see if we can figure out why the order isn't lexical already.
The openMP attributes were generated from pragmas, which are generated with `-Xclang -verify`. I found surprising that clang actually found the correct SourceLocation for these, so I don't think this has anything to do with the parser. The `asm` one may be worth investigating, tho.
https://github.com/llvm/llvm-project/pull/162556
More information about the cfe-commits
mailing list