[cfe-commits] r167609 - /cfe/trunk/lib/Sema/SemaOverload.cpp

Nico Weber nicolasweber at gmx.de
Fri Nov 9 00:38:04 PST 2012


Author: nico
Date: Fri Nov  9 02:38:04 2012
New Revision: 167609

URL: http://llvm.org/viewvc/llvm-project?rev=167609&view=rev
Log:
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.


Modified:
    cfe/trunk/lib/Sema/SemaOverload.cpp

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=167609&r1=167608&r2=167609&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Nov  9 02:38:04 2012
@@ -10999,7 +10999,7 @@
   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 =





More information about the cfe-commits mailing list