summaryrefslogtreecommitdiffstats
path: root/lib/Basic/Attributes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346521 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345132 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300556 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300543 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300539 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242730 91177308-0d34-0410-b5e6-96231b3b80d8
* Complete support for the SD-6 standing document (based off N4200) with ↵Aaron Ballman2014-11-141-2/+2
| | | | | | support for __has_cpp_attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221991 91177308-0d34-0410-b5e6-96231b3b80d8
* Post-commit review coding style change: renaming HasAttribute to ↵Aaron Ballman2014-03-311-1/+1
| | | | | | hasAttribute. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205201 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205181 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r204968 and r204969; while more build bots are happy with the ↵Aaron Ballman2014-03-271-17/+0
| | | | | | results, some still have link errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204974 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapplying r204952 with fixes which should hopefully resolve linking issues ↵Aaron Ballman2014-03-271-0/+17
| | | | | | with non-MSVC compilers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204968 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r204952, while I figure out what's going on with the makefile build.Aaron Ballman2014-03-271-20/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204955 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204952 91177308-0d34-0410-b5e6-96231b3b80d8