The AST printer was dropping attributes on enumerators (enum constants). Now it's not.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM, though if you wanted to add one more test with a C++ attribute (deprecated would work in C++14 mode), that would not make me sad. Something like:
enum [[deprecated]] E { One [[deprecated]] };
Comment Actions
Interestingly, this case doesn't actually work yet; we unconditionally print enum attributes after the close-brace even though that's not valid for C++ attributes. Do you think I should change that as well, or just land this patch as is?
Comment Actions
This is a pervasive issue with attributes, now that I put my thinking cap on. I think you're fine to land it as-is; we need a much larger fix to handle pretty printing attributes properly for all flavors.