[PATCH] Improve attributes printing.
Michael Han
fragmentshaders at gmail.com
Thu Mar 21 16:07:07 PDT 2013
Slightly change the logic of dealing with each type of attributes and add more test cases :)
For C++11 attributes, they could be printed anywhere except at end of declaration; for GNU attributes, we enforce that these attributes only appear at end of declaration to prevent them printing out multiple times; for special declaration location like empty declaration, we don't check the print constraints so all types of attributes are printed.
Richard, what's your thoughts on this approach? I think I understand the principals you mentioned in last review, but I don't know how to apply it to cases like these so both can be printed out correctly if we only allow C++11 attributes to print on a single location:
[[...]] int x;
struct [[...]] s;
Thanks!
Hi rsmith,
http://llvm-reviews.chandlerc.com/D395
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D395?vs=1315&id=1362#toc
Files:
test/SemaCXX/cxx11-attr-print.cpp
include/clang/AST/Attr.h
utils/TableGen/ClangAttrEmitter.cpp
lib/AST/DeclPrinter.cpp
lib/AST/StmtPrinter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D395.5.patch
Type: text/x-patch
Size: 12192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130321/3a10e18f/attachment.bin>
More information about the cfe-commits
mailing list