summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx11-stmt-attributes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add #pragma clang fpAdam Nemet2017-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This adds the new pragma and the first variant, contract(on/off/fast). The pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be placed at the beginning of a compound statement or at file scope. Similarly to STDC FP_CONTRACT there is no need to use attributes. First an annotate token is inserted with the parsed details of the pragma. Then the annotate token is parsed in the proper contexts and the Sema is updated with the corresponding FPOptions using the shared ActOn function with STDC FP_CONTRACT. After this the FPOptions from the Sema is propagated into the AST expression nodes. There is no change here. I was going to add a 'default' option besides 'on/off/fast' similar to STDC FP_CONTRACT but then decided against it. I think that we'd have to make option uppercase then to avoid using 'default' the keyword. Also because of the scoped activation of pragma I am not sure there is really a need a for this. Differential Revision: https://reviews.llvm.org/D31276 llvm-svn: 299470
* Diagnose C++11 attributes before fp_contract pragmas.Richard Smith2013-11-151-0/+5
| | | | llvm-svn: 194850
* PR15300: Support C++11 attributes on base-specifiers. We don't support any suchRichard Smith2013-02-191-20/+20
| | | | | | | | attributes yet, so just issue the appropriate diagnostics. Also generalize the fixit for attributes-in-the-wrong-place code and reuse it here, if attributes are placed after the access-specifier or 'virtual' in a base specifier. llvm-svn: 175575
* Treat alignas and _Alignas as keyword attributes. This allows us toRichard Smith2013-01-291-1/+1
| | | | | | | pretty-print them properly (modulo the more general badness in alignment attribute printing). llvm-svn: 173752
* Improve C++11 attribute parsing.Michael Han2012-10-031-26/+51
| | | | | | | | - General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST. - Add support to parse arguments of attributes that in 'gnu' namespace. - Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic. llvm-svn: 165082
* Add an AttributedStmt type to represent a statement with C++11 attributesRichard Smith2012-04-141-0/+54
attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite minimal. Patch by Alexander Kornienko! llvm-svn: 154723
OpenPOWER on IntegriCloud