diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-08-21 18:42:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-08-21 18:42:58 +0000 |
commit | dec06664a1c4d8984251083db2215875aea1c80d (patch) | |
tree | 09fc85de440d129a44ac8684befc2f947829228d /lib/Parse/ParseDecl.cpp | |
parent | eb0b6d556ff2b4a5053e89fd084eb34e44cea14c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index d3d2cf06e3..597d43fb1b 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/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; |