Fixed lexical decl context of out of line class template instantiations.

llvm-svn: 163206
This commit is contained in:
Abramo Bagnara 2012-09-05 09:05:18 +00:00
parent 5f5973df08
commit 02b9553bdb
1 changed files with 2 additions and 1 deletions

View File

@ -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);