diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-09-11 01:44:56 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-09-11 01:44:56 +0000 |
commit | 322d853d7d3e13a102d3a96bf9c8b813d78bffc5 (patch) | |
tree | a988003e5cab80ae8954d1959a1672b5d880c98e /clang/lib/Sema/SemaTemplate.cpp | |
parent | adc5456da09f77a0e094b06f41483adb1925d991 (diff) | |
download | bcm5719-llvm-322d853d7d3e13a102d3a96bf9c8b813d78bffc5.tar.gz bcm5719-llvm-322d853d7d3e13a102d3a96bf9c8b813d78bffc5.zip |
[sema] Fix assertion hit when using libclang to index a particular C++ snippet involving templates.
Assertion hit was in ClassTemplateSpecializationDecl::getSourceRange().
llvm-svn: 247373
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 527005094c9..b5b8b1ea8a9 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -7386,11 +7386,16 @@ Sema::ActOnExplicitInstantiation(Scope *S, } } + // Set the template specialization kind. Make sure it is set before + // instantiating the members which will trigger ASTConsumer callbacks. + Specialization->setTemplateSpecializationKind(TSK); InstantiateClassTemplateSpecializationMembers(TemplateNameLoc, Def, TSK); + } else { + + // Set the template specialization kind. + Specialization->setTemplateSpecializationKind(TSK); } - // Set the template specialization kind. - Specialization->setTemplateSpecializationKind(TSK); return Specialization; } |