[cfe-commits] r133600 - /cfe/trunk/lib/Sema/SemaLookup.cpp

Sean Hunt scshunt at csclub.uwaterloo.ca
Tue Jun 21 19:25:26 PDT 2011


Author: coppro
Date: Tue Jun 21 21:25:26 2011
New Revision: 133600

URL: http://llvm.org/viewvc/llvm-project?rev=133600&view=rev
Log:
Avoid making assumption that this is either a CXXMethodDecl or a
FunctionTemplateDecl. I'm not quite sure what else it could be, though,
and would appreciate some insight.

This ought to fix the broken builds

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

Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=133600&r1=133599&r2=133600&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Tue Jun 21 21:25:26 2011
@@ -2273,8 +2273,7 @@
             ArgType->getPointeeType().isConstQualified())
           Result->setConstParamMatch(true);
       }
-    } else {
-      FunctionTemplateDecl *Tmpl = cast<FunctionTemplateDecl>(*I);
+    } else if (FunctionTemplateDecl *Tmpl = cast<FunctionTemplateDecl>(*I)) {
       AddTemplateOverloadCandidate(Tmpl, DeclAccessPair::make(Tmpl, AS_public),
                                    0, &Arg, NumArgs, OCS, true);
     }





More information about the cfe-commits mailing list