Commit Graph

10 Commits

Author SHA1 Message Date
Manman Ren c7890fed01 Add an optional string argument to DeprecatedAttr for Fix-It.
We only add this to __attribute__((deprecated)).

Differential Revision: http://reviews.llvm.org/D17865

llvm-svn: 263652
2016-03-16 18:50:49 +00:00
Aaron Ballman 44d2ed9817 There is no std namespace for standards-based attributes. Removing the scope qualifier and updating the only affected test case.
llvm-svn: 201294
2014-02-13 04:31:04 +00:00
Aaron Ballman f58070baed Switched FormatAttr to using an IdentifierArgument instead of a StringArgument since that is a more accurate modeling.
llvm-svn: 189851
2013-09-03 21:02:22 +00:00
Enea Zaffanella a86d88c7cd Improved source code fidelity for gcc mode attribute.
llvm-svn: 184417
2013-06-20 12:46:19 +00:00
Michael Han d9450f778e Update tests to do a full match against printed C++11 attributes.
llvm-svn: 176074
2013-02-26 02:00:13 +00:00
Michael Han af02bbe84f [Sema][Attr]Fix alignment attribute printing.
Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.

llvm-svn: 174133
2013-02-01 01:19:17 +00:00
Richard Smith a5aaca9295 Propagate the spelling list index for an attribute across template instantiation.
llvm-svn: 173768
2013-01-29 04:21:28 +00:00
Richard Smith d11c7a1628 Treat alignas and _Alignas as keyword attributes. This allows us to
pretty-print them properly (modulo the more general badness in alignment
attribute printing).

llvm-svn: 173752
2013-01-29 01:48:07 +00:00
Richard Smith 0cdcc98200 Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.

llvm-svn: 173746
2013-01-29 01:24:26 +00:00
Michael Han 9931593299 PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.
Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td. 
This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute.
When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and
name, then passed to Attr that will use the index to print itself. 

Thanks to Richard Smith for the idea and review.

llvm-svn: 173358
2013-01-24 16:46:58 +00:00