summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/has_c_attribute.c
Commit message (Collapse)AuthorAgeFilesLines
* Disallow use of __has_c_attribute in C++ mode.Aaron Ballman2019-11-251-0/+6
| | | | | | | __has_cpp_attribute is not available in C mode, and __has_c_attribute should not be available in C++ mode. This also adds a test to demonstrate that we properly handle scoped attribute tokens even in C mode.
* Allow standards-based attributes to have leading and trailing underscores.Aaron Ballman2019-08-151-0/+4
| | | | | | This gives library implementers a way to use standards-based attributes that do not conflict with user-defined macros of the same name. Attributes in C2x require this behavior normatively (C2x 6.7.11p4), but there's no reason to not have the same behavior in C++, especially given that such attributes may be used by a C library consumed by a C++ compilation. llvm-svn: 369033
* Correct line endings that got mixed up in r320088; NFC.Aaron Ballman2017-12-071-12/+12
| | | | llvm-svn: 320115
* Add support for the __has_c_attribute builtin preprocessor macro.Aaron Ballman2017-12-071-0/+12
This behaves similar to the __has_cpp_attribute builtin macro in that it allows users to detect whether an attribute is supported with the [[]] spelling syntax, which can be enabled in C with -fdouble-square-bracket-attributes. llvm-svn: 320088
OpenPOWER on IntegriCloud