]> granicus.if.org Git - clang/commitdiff
Use isInvalidDecl() instead of isStatic() as suggested by dblaikie.
authorNico Weber <nicolasweber@gmx.de>
Fri, 9 Nov 2012 08:38:04 +0000 (08:38 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 9 Nov 2012 08:38:04 +0000 (08:38 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167609 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index 10e7ec422019ea22f9ef1f91e254227ac3c17505..e5a3deebc2fe3a5b7f3141de85a8ebe15d78d111 100644 (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 =