aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorSean Hunt <scshunt@csclub.uwaterloo.ca>2011-06-22 02:25:26 +0000
committerSean Hunt <scshunt@csclub.uwaterloo.ca>2011-06-22 02:25:26 +0000
commit4dba7b56d4551b7e03e20eeb7f45e5c962baa20c (patch)
tree957e2257f728bc896abcd6f69c3b24aab3d05513 /lib/Sema/SemaLookup.cpp
parent0a17cae4e3dcccda0e930f9f55574c8f3bb5337c (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 46058b69d1..df4484e0b3 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -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);
}