[cfe-commits] r163206 - /cfe/trunk/lib/Sema/SemaTemplate.cpp
Abramo Bagnara
abramo.bagnara at gmail.com
Wed Sep 5 02:05:18 PDT 2012
Author: abramo
Date: Wed Sep 5 04:05:18 2012
New Revision: 163206
URL: http://llvm.org/viewvc/llvm-project?rev=163206&view=rev
Log:
Fixed lexical decl context of out of line class template instantiations.
Modified:
cfe/trunk/lib/Sema/SemaTemplate.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=163206&r1=163205&r2=163206&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Wed Sep 5 04:05:18 2012
@@ -2088,7 +2088,8 @@
Converted.data(),
Converted.size(), 0);
ClassTemplate->AddSpecialization(Decl, InsertPos);
- Decl->setLexicalDeclContext(CurContext);
+ if (ClassTemplate->isOutOfLine())
+ Decl->setLexicalDeclContext(ClassTemplate->getLexicalDeclContext());
}
CanonType = Context.getTypeDeclType(Decl);
More information about the cfe-commits
mailing list