diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-27 01:42:32 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-27 01:42:32 +0000 |
commit | 1453e310fd340b21fde4cb4b9f02956f0486f630 (patch) | |
tree | ed3a9e6b0a24d0dc7092d8f5752bd03ddf102fc7 /clang/lib/Parse/ParseDecl.cpp | |
parent | e9a5bcf17efdd874879dfe5bb1789ff6b03a5be2 (diff) | |
download | bcm5719-llvm-1453e310fd340b21fde4cb4b9f02956f0486f630.tar.gz bcm5719-llvm-1453e310fd340b21fde4cb4b9f02956f0486f630.zip |
Add cross-referencing comments to ParseDirectDeclarator to note that
isConstructorDeclaration also needs updating for any extension to the
grammar of a direct-declarator.
llvm-svn: 153490
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 75abcae2828..9d8aed53331 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3393,7 +3393,8 @@ bool Parser::isConstructorDeclarator() { ConsumeToken(); // If this is not a constructor, we must be parsing a declarator, - // which must have one of the following syntactic forms: + // which must have one of the following syntactic forms (see the + // grammar extract at the start of ParseDirectDeclarator): switch (Tok.getKind()) { case tok::l_paren: // C(X ( int)); @@ -3543,7 +3544,8 @@ void Parser::ParseDeclarator(Declarator &D) { /// ptr-operator production. /// /// If the grammar of this construct is extended, matching changes must also be -/// made to TryParseDeclarator and MightBeDeclarator. +/// made to TryParseDeclarator and MightBeDeclarator, and possibly to +/// isConstructorDeclarator. /// /// declarator: [C99 6.7.5] [C++ 8p4, dcl.decl] /// [C] pointer[opt] direct-declarator @@ -3735,6 +3737,8 @@ void Parser::ParseDeclaratorInternal(Declarator &D, /// '~' class-name /// template-id /// +/// Note, any additional constructs added here may need corresponding changes +/// in isConstructorDeclarator. void Parser::ParseDirectDeclarator(Declarator &D) { DeclaratorScopeObj DeclScopeObj(*this, D.getCXXScopeSpec()); |