diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2012-09-05 09:05:18 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2012-09-05 09:05:18 +0000 |
commit | 4f216d38201d8fcb0ffd76f8984f4da052b12f5f (patch) | |
tree | 9780d153dbaa30819fca7f45e012a1cac2d1a56c /lib/Sema/SemaTemplate.cpp | |
parent | 45e4e086cf7b4552e806669825f5b2aa2368cc36 (diff) |
Fixed lexical decl context of out of line class template instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 977b360230..d6ad8ebf53 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -2088,7 +2088,8 @@ QualType Sema::CheckTemplateIdType(TemplateName Name, Converted.data(), Converted.size(), 0); ClassTemplate->AddSpecialization(Decl, InsertPos); - Decl->setLexicalDeclContext(CurContext); + if (ClassTemplate->isOutOfLine()) + Decl->setLexicalDeclContext(ClassTemplate->getLexicalDeclContext()); } CanonType = Context.getTypeDeclType(Decl); |