[PATCH] Improve attributes printing.
Michael Han
fragmentshaders at gmail.com
Mon Feb 11 14:24:18 PST 2013
Hi rsmith,
This patch improves attribute printing by taking the source location of attributes into account when print them out. Previously, we hard code the print out locations for attributes and this has some issues especially for C++11 attributes for example:
void foo [[noreturn]] (); would be printed out as
void foo () [[noreturn]]; which has a different semantic with source.
This patch uses the source locations of the attributes and VarDecl / FunctionDecl to print out attributes at expected locations as described in source files. It also fixes several FIXMEs in existing tests.
http://llvm-reviews.chandlerc.com/D395
Files:
lib/AST/DeclPrinter.cpp
test/SemaCXX/cxx11-attr-print.cpp
test/SemaCXX/attr-print.cpp
test/Sema/attr-print.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D395.1.patch
Type: text/x-patch
Size: 14590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130211/f0c52ac6/attachment.bin>
More information about the cfe-commits
mailing list