summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2012-11-09 08:38:04 +0000
committerNico Weber <nicolasweber@gmx.de>2012-11-09 08:38:04 +0000
commit1a52a4d36cc518725d8e8ba3b984341a30cd7fdb (patch)
treef6a3f51b1d286b7e2102fd3382106d9b37d9f1d8
parente0ff690900ecb28e7d840d7f765f25437eb67c66 (diff)
downloadclang-1a52a4d36cc518725d8e8ba3b984341a30cd7fdb.tar.gz
clang-1a52a4d36cc518725d8e8ba3b984341a30cd7fdb.tar.bz2
clang-1a52a4d36cc518725d8e8ba3b984341a30cd7fdb.tar.xz
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
-rw-r--r--lib/Sema/SemaOverload.cpp2
1 files changed, 1 insertions, 1 deletions
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<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 =