hanchenye-llvm-project/clang/lib/Sema
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
..
AnalysisBasedWarnings.cpp Implement C++11 semantics for [[noreturn]] attribute. This required splitting 2013-01-17 01:30:42 +00:00
AttributeList.cpp PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
CMakeLists.txt PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
CodeCompleteConsumer.cpp Use 'const Decl *' throughout code completion in Sema 2013-01-23 17:21:11 +00:00
DeclSpec.cpp Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) 2013-01-20 12:31:11 +00:00
DelayedDiagnostic.cpp objective-C: when diagnosing deprecated/unavailable usage of 2012-09-21 20:46:37 +00:00
IdentifierResolver.cpp IdentifierResolver: Remove an unnecessary include and an unused parameter. 2012-12-17 03:51:09 +00:00
JumpDiagnostics.cpp s/CPlusPlus0x/CPlusPlus11/g 2013-01-02 11:42:31 +00:00
Makefile
MultiplexExternalSemaSource.cpp Truth in advertising: LocallyScopedExternalDecls actually only contains 2013-01-10 23:43:47 +00:00
Scope.cpp Reapply r151638 and r151641. 2012-02-29 10:24:19 +00:00
ScopeInfo.cpp -Warc-repeated-use-of-weak: fix a use-of-uninitialized and add a test case. 2012-10-11 17:02:00 +00:00
Sema.cpp Fixed trailing whitespace. 2013-01-20 01:04:14 +00:00
SemaAccess.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
SemaAttr.cpp Disable caching of visibility. 2013-01-12 06:42:30 +00:00
SemaCXXScopeSpec.cpp Use 'const Decl *' throughout code completion in Sema 2013-01-23 17:21:11 +00:00
SemaCast.cpp Add a new LangOpt NativeHalfType. This option allows for native half/fp16 2013-01-23 11:56:20 +00:00
SemaChecking.cpp Make __attribute__((nonnull)) use the general expression evaluator to search for 2013-01-23 05:08:29 +00:00
SemaCodeComplete.cpp Use 'const Decl *' throughout code completion in Sema 2013-01-23 17:21:11 +00:00
SemaConsumer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
SemaDecl.cpp PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
SemaDeclAttr.cpp PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
SemaDeclCXX.cpp Remove windows line endings. 2013-01-18 23:03:15 +00:00
SemaDeclObjC.cpp Eliminate Sema::CompareProperties(), which was walking over a pile of 2013-01-21 19:42:21 +00:00
SemaExceptionSpec.cpp s/CPlusPlus0x/CPlusPlus11/g 2013-01-02 11:42:31 +00:00
SemaExpr.cpp Micro cleanup: use an array of const char, rather than an array of char, as the 2013-01-23 23:38:20 +00:00
SemaExprCXX.cpp Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on 2013-01-17 01:17:56 +00:00
SemaExprMember.cpp s/CPlusPlus0x/CPlusPlus11/g 2013-01-02 11:42:31 +00:00
SemaExprObjC.cpp Small code change to improve performance 2013-01-22 19:05:17 +00:00
SemaFixItUtils.cpp s/CPlusPlus0x/CPlusPlus11/g 2013-01-02 11:42:31 +00:00
SemaInit.cpp Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) 2013-01-20 12:31:11 +00:00
SemaLambda.cpp Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
SemaLookup.cpp Rework the traversal of Objective-C categories and extensions to 2013-01-16 23:00:23 +00:00
SemaObjCProperty.cpp Eliminate Sema::CompareProperties(), which was walking over a pile of 2013-01-21 19:42:21 +00:00
SemaOverload.cpp Start checking nonnull (as well as format and argument_with_type_tag) on 2013-01-24 02:03:08 +00:00
SemaPseudoObject.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
SemaStmt.cpp Suppress all -Wunused-value warnings from macro body expansions. 2013-01-17 02:06:08 +00:00
SemaStmtAsm.cpp [ms-inline asm] Extend the Sema interface to get the size and length of a 2013-01-17 19:21:24 +00:00
SemaStmtAttr.cpp Improve C++11 attribute parsing. 2012-10-03 01:56:22 +00:00
SemaTemplate.cpp Apply adjustment to function- and array-typed non-type template 2013-01-16 00:52:15 +00:00
SemaTemplateDeduction.cpp Use 'const Decl *' throughout code completion in Sema 2013-01-23 17:21:11 +00:00
SemaTemplateInstantiate.cpp Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
SemaTemplateInstantiateDecl.cpp ArrayRef-ize some ctor initializer related APIs 2013-01-17 05:26:25 +00:00
SemaTemplateVariadic.cpp Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) 2013-01-20 12:31:11 +00:00
SemaType.cpp Implement -Wvla correctly 2013-01-23 20:02:51 +00:00
TargetAttributesSema.cpp PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
TargetAttributesSema.h Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here. 2012-12-20 19:22:21 +00:00
TreeTransform.h One can override an Objective-C ARC ownership qualifier that came from 2013-01-17 23:59:28 +00:00
TypeLocBuilder.h Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00