aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-15 17:59:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-15 17:59:04 +0000
commite2c31ff0bc622e6fd7d47d7e08b53840f3be6c89 (patch)
tree4c9ea00c55f5164b5db73832a702b744401a7561 /lib/Sema/SemaTemplate.cpp
parent7a0ba875a7dcee94ec74fa79b7f8a247d200a76c (diff)
Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
instantiating the definition of a function from a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 6f65288164..09e32f7b65 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -2332,14 +2332,14 @@ Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation TemplateLoc,
//
// This check comes when we actually try to perform the
// instantiation.
- if (SpecializationRequiresInstantiation &&
- InstantiateClassTemplateSpecialization(Specialization, true))
- return true;
+ if (SpecializationRequiresInstantiation)
+ InstantiateClassTemplateSpecialization(Specialization, true);
+ else {
+ // Instantiate the members of this class template specialization.
+ InstantiatingTemplate Inst(*this, TemplateLoc, Specialization);
+ InstantiateClassTemplateSpecializationMembers(TemplateLoc, Specialization);
+ }
- // Instantiate the members of this class template specialization.
- InstantiatingTemplate Inst(*this, TemplateLoc, Specialization);
- InstantiateClassTemplateSpecializationMembers(TemplateLoc, Specialization);
-
return DeclPtrTy::make(Specialization);
}