Automatically insert line feed after pretty printing of all pragma-like attributes.
Details
Diff Detail
Event Timeline
LGTM, thanks! If you would be so kind as to add a test for #pragma init_seg("bss"), that would be great -- it seems its printPrettyPragma never put a newline in there for that attribute, and so I would guess there's lacking test coverage that this change should fix.
~Aaron
Ok, will do
Best regards,
Alexey Bataev
Software Engineer
Intel Compiler Team
08.10.2015 16:02, Aaron Ballman пишет:
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.LGTM, thanks! If you would be so kind as to add a test for #pragma init_seg("bss"), that would be great -- it seems its printPrettyPragma never put a newline in there for that attribute, and so I would guess there's lacking test coverage that this change should fix.
~Aaron
Printing of pragma-like attributes for declarations did not worked at all. Fixed it and added test for printing #pragma init_seg.
Wow, good catch on the fact that this didn't work at all! Thank you for tackling it.
lib/AST/DeclPrinter.cpp | ||
---|---|---|
197 ↗ | (On Diff #36850) | Would it make more sense to add a prettyPrintPragmas(Decl *D) function instead? |
test/SemaCXX/pragma-init_seg.cpp | ||
1 ↗ | (On Diff #36850) | I think this should be a new test under Misc\. We have ast-print-pragmas.cpp that looks like a good place for it to go. |