[cfe-commits] r153490 - /cfe/trunk/lib/Parse/ParseDecl.cpp
Richard Smith
richard-llvm at metafoo.co.uk
Mon Mar 26 18:42:32 PDT 2012
Author: rsmith
Date: Mon Mar 26 20:42:32 2012
New Revision: 153490
URL: http://llvm.org/viewvc/llvm-project?rev=153490&view=rev
Log:
Add cross-referencing comments to ParseDirectDeclarator to note that
isConstructorDeclaration also needs updating for any extension to the
grammar of a direct-declarator.
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=153490&r1=153489&r2=153490&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Mon Mar 26 20:42:32 2012
@@ -3393,7 +3393,8 @@
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 @@
/// 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 @@
/// '~' 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());
More information about the cfe-commits
mailing list