From: Nico Weber Date: Fri, 9 Nov 2012 08:38:04 +0000 (+0000) Subject: Use isInvalidDecl() instead of isStatic() as suggested by dblaikie. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a52a4d36cc518725d8e8ba3b984341a30cd7fdb;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167609 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 10e7ec4220..e5a3deebc2 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -10999,7 +10999,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, CXXMethodDecl *Method = cast(Best->Function); // An error diagnostic has already been printed when parsing the declaration. - if (Method->isStatic()) + if (Method->isInvalidDecl()) return ExprError(); const FunctionProtoType *Proto =