summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/attr-optnone.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow a double-underscore spelling of Clang attributes using double square ↵Aaron Ballman2018-11-091-2/+4
| | | | | | | | | | bracket syntax. This matches a similar behavior with GCC accepting [[gnu::__attr__]] as a alias for [[gnu::attr]] in that clang attributes can now be spelled with two leading and trailing underscores. I had always intended for this to work, but missed the critical bit. We already had an existing test in test/Preprocessor/has_attribute.cpp for [[clang::__fallthrough__]] but using that spelling would still give an "unknown attribute" diagnostic. llvm-svn: 346547
* Introduce the _Clang scoped attribute token.Aaron Ballman2018-11-091-0/+6
| | | | | | 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
* When attribute 'optnone' appears on the same declaration with aPaul Robinson2015-01-131-8/+13
| | | | | | | | | | | | conflicting attribute, warn about the conflict and pick a "winning" attribute to preserve, instead of emitting an error. This matches the behavior when the conflicting attributes are on different declarations. Along the way I discovered that conflicts involving __forceinline were reported as 'always_inline' (alternate spelling, same attribute) so fixed that up to report the attribute as spelled in the source. llvm-svn: 225813
* Warn when attribute 'optnone' conflicts with attributes on aPaul Robinson2014-12-151-0/+18
| | | | | | different declaration of the same function. llvm-svn: 224256
* Diagnose attributes 'optnone' and 'minsize' on the same declaration.Paul Robinson2014-12-101-0/+3
| | | | | | | Eventually we'll diagnose them on different declarations, but let's get this part out of the way first. llvm-svn: 223985
* Revert r223980 as it had wrong commit message.Paul Robinson2014-12-101-3/+0
| | | | llvm-svn: 223984
* Rename a couple of preprocessor symbols to be more descriptive. NFC.Paul Robinson2014-12-101-0/+3
| | | | | | Review feedback from recent changes to GetSVN.cmake. llvm-svn: 223980
* Implement the 'optnone' attribute, which suppresses most optimizationsPaul Robinson2014-03-311-0/+47
on a function. llvm-svn: 205255
OpenPOWER on IntegriCloud