diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-07-22 23:36:59 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-07-22 23:36:59 +0000 |
commit | 1a9b9adf6ff83d48a797f20cc607be9c5eb154c6 (patch) | |
tree | 9d5024a4b7fb4cb223347d9c35fe3d5065885a63 /lib/Parse/ParseTentative.cpp | |
parent | 8747ea8f68604c5c2719f387628b4f76074f3a77 (diff) | |
download | clang-1a9b9adf6ff83d48a797f20cc607be9c5eb154c6.tar.gz |
P0217R3: Parsing support and framework for AST representation of C++1z
decomposition declarations.
There are a couple of things in the wording that seem strange here:
decomposition declarations are permitted at namespace scope (which we partially
support here) and they are permitted as the declaration in a template (which we
reject).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index 7703c33b87..556fbf337b 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -74,11 +74,18 @@ bool Parser::isCXXDeclarationStatement() { /// /// simple-declaration: /// decl-specifier-seq init-declarator-list[opt] ';' +/// decl-specifier-seq ref-qualifier[opt] '[' identifier-list ']' +/// brace-or-equal-initializer ';' [C++17] /// /// (if AllowForRangeDecl specified) /// for ( for-range-declaration : for-range-initializer ) statement +/// /// for-range-declaration: -/// attribute-specifier-seqopt type-specifier-seq declarator +/// decl-specifier-seq declarator +/// decl-specifier-seq ref-qualifier[opt] '[' identifier-list ']' +/// +/// In any of the above cases there can be a preceding attribute-specifier-seq, +/// but the caller is expected to handle that. bool Parser::isCXXSimpleDeclaration(bool AllowForRangeDecl) { // C++ 6.8p1: // There is an ambiguity in the grammar involving expression-statements and |