summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Attributes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move some definitions from Sema to Basic to fix shared libs buildErich Keane2019-09-161-1/+74
| | | | | | | | r371875 moved some functionality around to a Basic header file, but didn't move its definitions as well. This patch moves some things around so that shared library building can work. llvm-svn: 371985
* Introduce the _Clang scoped attribute token.Aaron Ballman2018-11-091-10/+12
| | | | | | Currently, we only accept clang as the scoped attribute identifier for double square bracket attributes provided by Clang, but this has the potential to conflict with user-defined macros. To help alleviate these concerns, this introduces the _Clang scoped attribute identifier as an alias for clang. It also introduces a warning with a fixit on the off chance someone attempts to use __clang__ as the scoped attribute (which is a predefined compiler identification macro). llvm-svn: 346521
* Support accepting __gnu__ as a scoped attribute namespace that aliases to gnu.Aaron Ballman2018-10-241-6/+11
| | | | | | This is useful in libstdc++ to avoid clashes with identifiers in the user's namespace. llvm-svn: 345132
* Add #pragma clang attributeAlex Lorenz2017-04-181-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
* Revert r300539 - Add #pragma clang attributeAlex Lorenz2017-04-181-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
* Add #pragma clang attributeAlex Lorenz2017-04-181-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
* Ignore the "novtable" declspec when not using the Microsoft C++ ABI.Bob Wilson2015-07-201-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
* Complete support for the SD-6 standing document (based off N4200) with ↵Aaron Ballman2014-11-141-2/+2
| | | | | | support for __has_cpp_attribute. llvm-svn: 221991
* Post-commit review coding style change: renaming HasAttribute to ↵Aaron Ballman2014-03-311-1/+1
| | | | | | hasAttribute. No functional changes. llvm-svn: 205201
* Reapplying r204952 a second time.Aaron Ballman2014-03-311-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
* Reverting r204968 and r204969; while more build bots are happy with the ↵Aaron Ballman2014-03-271-17/+0
| | | | | | results, some still have link errors. llvm-svn: 204974
* Reapplying r204952 with fixes which should hopefully resolve linking issues ↵Aaron Ballman2014-03-271-0/+17
| | | | | | with non-MSVC compilers. llvm-svn: 204968
* Reverting r204952, while I figure out what's going on with the makefile build.Aaron Ballman2014-03-271-20/+0
| | | | llvm-svn: 204955
* Clean up the __has_attribute implementation without modifying its behavior. Aaron Ballman2014-03-271-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
OpenPOWER on IntegriCloud