summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-21 18:42:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-21 18:42:58 +0000
commit5ed5ae476e5c7d26acf6ee1ccbcaa6b0487ceb1f (patch)
treec8e79b405689c3e354f65300e250c5ddb64665ad /clang/lib/Parse/ParseDecl.cpp
parentcb7444342b54411155d28f601bc6606c4969bc3f (diff)
downloadbcm5719-llvm-5ed5ae476e5c7d26acf6ee1ccbcaa6b0487ceb1f.tar.gz
bcm5719-llvm-5ed5ae476e5c7d26acf6ee1ccbcaa6b0487ceb1f.zip
Introduce support for constructor templates, which can now be declared
and will participate in overload resolution. Unify the instantiation of CXXMethodDecls and CXXConstructorDecls, which had already gotten out-of-sync. llvm-svn: 79658
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index d3d2cf06e35..597d43fb1b2 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -844,7 +844,10 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
// being defined and the next token is a '(', then this is a
// constructor declaration. We're done with the decl-specifiers
// and will treat this token as an identifier.
- if (getLang().CPlusPlus && CurScope->isClassScope() &&
+ if (getLang().CPlusPlus &&
+ (CurScope->isClassScope() ||
+ (CurScope->isTemplateParamScope() &&
+ CurScope->getParent()->isClassScope())) &&
Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope) &&
NextToken().getKind() == tok::l_paren)
goto DoneWithDeclSpec;
OpenPOWER on IntegriCloud