Use isInvalidDecl() instead of isStatic() as suggested by dblaikie.

I couldn't think of a way to make an operator() invalid without returning
earlier from this function other than making it static, so no new test.

llvm-svn: 167609
This commit is contained in:
Nico Weber 2012-11-09 08:38:04 +00:00
parent 1cfef3e9ee
commit 9512d3f161
1 changed files with 1 additions and 1 deletions

View File

@ -10999,7 +10999,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj,
CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function);
// An error diagnostic has already been printed when parsing the declaration.
if (Method->isStatic())
if (Method->isInvalidDecl())
return ExprError();
const FunctionProtoType *Proto =