aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 4209fd7a14..d1503695bc 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1718,13 +1718,8 @@ TemplateDeclInstantiator::SubstTemplateParams(TemplateParameterList *L) {
}
// Clean up if we had an error.
- if (Invalid) {
- for (ParamVector::iterator PI = Params.begin(), PE = Params.end();
- PI != PE; ++PI)
- if (*PI)
- (*PI)->Destroy(SemaRef.Context);
+ if (Invalid)
return NULL;
- }
TemplateParameterList *InstL
= TemplateParameterList::Create(SemaRef.Context, L->getTemplateLoc(),