aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Attributes.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-04-18Add #pragma clang attributeAlex Lorenz1-0/+11
This is a recommit of r300539 that was reverted in r300543 due to test failures. The original commit message is displayed below: 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 llvm-svn: 300556
2017-04-18Revert r300539 - Add #pragma clang attributeAlex Lorenz1-11/+0
Some tests fail on the Windows buildbots. I will have to investigate more. This commit reverts r300539, r300540 and r300542. llvm-svn: 300543
2017-04-18Add #pragma clang attributeAlex Lorenz1-0/+11
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 llvm-svn: 300539
2015-07-20Ignore the "novtable" declspec when not using the Microsoft C++ ABI.Bob Wilson1-2/+2
Clang used to silently ignore __declspec(novtable). It is implemented now, but leaving the vtable uninitialized does not work when using the Itanium ABI, where the class layout for complex class hierarchies is stored in the vtable. It might be possible to honor the novtable attribute in some simple cases and either report an error or ignore it in more complex situations, but it’s not clear if that would be worthwhile. There is also value in having a simple and predictable behavior, so this changes clang to simply ignore novtable when not using the Microsoft C++ ABI. llvm-svn: 242730
2014-11-14Complete support for the SD-6 standing document (based off N4200) with ↵Aaron Ballman1-2/+2
support for __has_cpp_attribute. llvm-svn: 221991
2014-03-31Post-commit review coding style change: renaming HasAttribute to ↵Aaron Ballman1-1/+1
hasAttribute. No functional changes. llvm-svn: 205201
2014-03-31Reapplying r204952 a second time.Aaron Ballman1-0/+17
Clean up the __has_attribute implementation without modifying its behavior. Replaces the tablegen-driven AttrSpellings.inc, which lived in the lexing layer with AttrHasAttributeImpl.inc, which lives in the basic layer. Updates the preprocessor to call through to this new functionality which can take additional information into account (such as scopes and syntaxes). Expose the ability for parts of the compiler to ask whether an attribute is supported for a given spelling (including scope), syntax, triple and language options. llvm-svn: 205181
2014-03-27Reverting r204968 and r204969; while more build bots are happy with the ↵Aaron Ballman1-17/+0
results, some still have link errors. llvm-svn: 204974
2014-03-27Reapplying r204952 with fixes which should hopefully resolve linking issues ↵Aaron Ballman1-0/+17
with non-MSVC compilers. llvm-svn: 204968
2014-03-27Reverting r204952, while I figure out what's going on with the makefile build.Aaron Ballman1-20/+0
llvm-svn: 204955
2014-03-27Clean up the __has_attribute implementation without modifying its behavior. Aaron Ballman1-0/+20
Replaces the tablegen-driven AttrSpellings.inc, which lived in the lexing layer with AttrHasAttributeImpl.inc, which lives in the basic layer. Updates the preprocessor to call through to this new functionality which can take additional information into account (such as scopes and syntaxes). Expose the ability for parts of the compiler to ask whether an attribute is supported for a given spelling (including scope), syntax, triple and language options. llvm-svn: 204952