]> granicus.if.org Git - clang/commit
Add #pragma clang attribute
authorAlex Lorenz <arphaman@gmail.com>
Tue, 18 Apr 2017 09:41:47 +0000 (09:41 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Tue, 18 Apr 2017 09:41:47 +0000 (09:41 +0000)
commitc79938aacab81240ec20977d1dcb5a934408aa16
tree300480232c6c0b916eb0806587ddd6fb5a17a5f8
parenta3307a12a12cf6e61c16b7d3076e6cf7953bd84f
Add #pragma clang attribute

The new '#pragma clang attribute' directive can be used to apply attributes to
multiple declarations. An attribute must satisfy the following conditions to
be supported by the pragma:
- It must have a subject list that's defined in the TableGen file.
- It must be documented.
- It must not be late parsed.
- It must have a GNU/C++11 spelling.

Differential Revision: https://reviews.llvm.org/D30009

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300539 91177308-0d34-0410-b5e6-96231b3b80d8
40 files changed:
docs/LanguageExtensions.rst
include/clang/Basic/Attr.td
include/clang/Basic/AttrSubjectMatchRules.h [new file with mode: 0644]
include/clang/Basic/CMakeLists.txt
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/TokenKinds.def
include/clang/Parse/CMakeLists.txt
include/clang/Parse/Parser.h
include/clang/Sema/AttributeList.h
include/clang/Sema/Sema.h
lib/Basic/Attributes.cpp
lib/Parse/ParsePragma.cpp
lib/Parse/ParseStmt.cpp
lib/Parse/Parser.cpp
lib/Sema/AttributeList.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaAttr.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaDeclObjC.cpp
test/FixIt/fixit-pragma-attribute.c [new file with mode: 0644]
test/FixIt/fixit-pragma-attribute.cpp [new file with mode: 0644]
test/Misc/pragma-attribute-cxx-subject-match-rules.cpp [new file with mode: 0644]
test/Misc/pragma-attribute-cxx.cpp [new file with mode: 0644]
test/Misc/pragma-attribute-objc-subject-match-rules.m [new file with mode: 0644]
test/Misc/pragma-attribute-objc.m [new file with mode: 0644]
test/Misc/pragma-attribute-strict-subjects.c [new file with mode: 0644]
test/Misc/pragma-attribute-supported-attributes-list.test [new file with mode: 0644]
test/Parser/pragma-attribute-declspec.cpp [new file with mode: 0644]
test/Parser/pragma-attribute.cpp [new file with mode: 0644]
test/Sema/pragma-attribute-strict-subjects.c [new file with mode: 0644]
test/Sema/pragma-attribute.c [new file with mode: 0644]
test/lit.cfg
test/lit.site.cfg.in
utils/TableGen/ClangAttrEmitter.cpp
utils/TableGen/TableGen.cpp
utils/TableGen/TableGenBackends.h