diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-15 17:59:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-15 17:59:04 +0000 |
commit | e2c31ff0bc622e6fd7d47d7e08b53840f3be6c89 (patch) | |
tree | 4c9ea00c55f5164b5db73832a702b744401a7561 /lib/Sema/SemaTemplate.cpp | |
parent | 7a0ba875a7dcee94ec74fa79b7f8a247d200a76c (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.cpp | 14 |
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); } |