summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/has_attribute.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow standards-based attributes to have leading and trailing underscores.Aaron Ballman2019-08-151-0/+3
| | | | | | 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
* Implement P1771Erich Keane2019-07-251-1/+1
| | | | | | | | | | | | | As passed in the Cologne meeting and treated by Core as a DR, [[nodiscard]] was applied to constructors so that they can be diagnosed in cases where the user forgets a variable name for a type. The intent is to enable the library to start using this on the constructors of scope_guard/lock_guard. Differential Revision: https://reviews.llvm.org/D64914 llvm-svn: 367027
* Revert the change to the [[nodiscard]] feature test macro value.Aaron Ballman2019-07-221-1/+1
| | | | | | This value only gets bumped once both P1301 and P1771 are implemented. llvm-svn: 366682
* Implement P1301R4, which allows specifying an optional message on the ↵Aaron Ballman2019-07-201-1/+1
| | | | | | | | [[nodiscard]] attribute. This also bumps the attribute feature test value and introduces the notion of a C++2a extension warning. llvm-svn: 366626
* Fix has_attribute.cpp test on Windows after r364102Reid Kleckner2019-06-211-2/+2
| | | | llvm-svn: 364108
* Fix __has_cpp_attribute expansion to produce trailing L and (whereRichard Smith2019-06-211-85/+67
| | | | | | | | necessary) leading whitespace. Simplify unit test and extend to cover no_unique_address attribute. llvm-svn: 364102
* Introduce the _Clang scoped attribute token.Aaron Ballman2018-11-091-11/+27
| | | | | | 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-11/+15
| | | | | | This is useful in libstdc++ to avoid clashes with identifiers in the user's namespace. llvm-svn: 345132
* Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What ↵Richard Smith2016-03-081-0/+10
| | | | | | year is it?!) llvm-svn: 262887
* Added a new preprocessor macro: __has_declspec_attribute. This can be used ↵Aaron Ballman2014-12-051-1/+16
| | | | | | as a way to determine whether Clang supports a __declspec spelling for a given attribute, similar to __has_attribute and __has_cpp_attribute. llvm-svn: 223467
* Convert CR+LF -> LF in a test fileTimur Iskhodzhanov2014-11-201-53/+53
| | | | llvm-svn: 222429
* Avoid earlier test interfering with later one.Richard Smith2014-11-201-2/+2
| | | | llvm-svn: 222403
* Complete support for the SD-6 standing document (based off N4200) with ↵Aaron Ballman2014-11-141-0/+53
support for __has_cpp_attribute. llvm-svn: 221991
OpenPOWER on IntegriCloud