]> granicus.if.org Git - clang/commitdiff
Avoid making assumption that this is either a CXXMethodDecl or a
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Wed, 22 Jun 2011 02:25:26 +0000 (02:25 +0000)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Wed, 22 Jun 2011 02:25:26 +0000 (02:25 +0000)
FunctionTemplateDecl. I'm not quite sure what else it could be, though,
and would appreciate some insight.

This ought to fix the broken builds

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

lib/Sema/SemaLookup.cpp

index 46058b69d14a4f3bf2383d0fafc6232ef7536533..df4484e0b33e6c06859cd697db3567faa4571031 100644 (file)
@@ -2273,8 +2273,7 @@ Sema::SpecialMemberOverloadResult *Sema::LookupSpecialMember(CXXRecordDecl *D,
             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);
     }