aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2011-10-11 00:28:45 +0000
committerKaelyn Uhrain <rikka@google.com>2011-10-11 00:28:45 +0000
commit2c712f50cd56eaf3662989b556e9c6b1e8fcd11a (patch)
treee85b8897e1b6096adc8777d2e87bc57d58cd1887 /lib/Sema/SemaTemplateInstantiateDecl.cpp
parent2afd76618ee35193172c764d25f1f0996765b5e7 (diff)
Move some bool flags out of function parameter lists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index c8628dbd49..02a05d5182 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -346,13 +346,12 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
// FIXME: In theory, we could have a previous declaration for variables that
// are not static data members.
- bool Redeclaration = false;
// FIXME: having to fake up a LookupResult is dumb.
LookupResult Previous(SemaRef, Var->getDeclName(), Var->getLocation(),
Sema::LookupOrdinaryName, Sema::ForRedeclaration);
if (D->isStaticDataMember())
SemaRef.LookupQualifiedName(Previous, Owner, false);
- SemaRef.CheckVariableDeclaration(Var, Previous, Redeclaration);
+ SemaRef.CheckVariableDeclaration(Var, Previous);
if (D->isOutOfLine()) {
if (!D->isStaticDataMember())
@@ -1160,7 +1159,6 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D,
if (InitFunctionInstantiation(Function, D))
Function->setInvalidDecl();
- bool Redeclaration = false;
bool isExplicitSpecialization = false;
LookupResult Previous(SemaRef, Function->getDeclName(), SourceLocation(),
@@ -1212,7 +1210,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D,
}
SemaRef.CheckFunctionDeclaration(/*Scope*/ 0, Function, Previous,
- isExplicitSpecialization, Redeclaration);
+ isExplicitSpecialization);
NamedDecl *PrincipalDecl = (TemplateParams
? cast<NamedDecl>(FunctionTemplate)
@@ -1496,9 +1494,8 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D,
Previous.clear();
}
- bool Redeclaration = false;
if (!IsClassScopeSpecialization)
- SemaRef.CheckFunctionDeclaration(0, Method, Previous, false, Redeclaration);
+ SemaRef.CheckFunctionDeclaration(0, Method, Previous, false);
if (D->isPure())
SemaRef.CheckPureMethod(Method, SourceRange());