diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 01:09:16 +0000 | 
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 01:09:16 +0000 | 
| commit | 19b66a5e32306f661886f5e7a95cf77f113826ed (patch) | |
| tree | ce2d7cafbd2a30b586fee8f102a3fddcebed7e10 /clang/lib | |
| parent | 865da3cae0acc9c6be3fc453609dd125a7771037 (diff) | |
| download | bcm5719-llvm-19b66a5e32306f661886f5e7a95cf77f113826ed.tar.gz bcm5719-llvm-19b66a5e32306f661886f5e7a95cf77f113826ed.zip | |
In a declarator, consider an identifier a constructor only if it is followed by '('.
Previously:
class C {
  int C;  // Declarator::SetConstructor was called here.
};
llvm-svn: 58880
Diffstat (limited to 'clang/lib')
| -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 | 

