diff options
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 2b18be02a3d..39d3acc0f9e 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -1363,7 +1363,8 @@ void Parser::ParseDirectDeclarator(Declarator &D) { // Determine whether this identifier is a C++ constructor name or // a normal identifier. if (getLang().CPlusPlus && - Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope)) + Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope) && + NextToken().is(tok::l_paren)) D.SetConstructor(Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope), Tok.getIdentifierInfo(), Tok.getLocation()); else |

