Don't instantiate members not belonging in the semantic context of the template.
commit68ddf3fc7e63a08755c55aa8dfe23240c52aecf3
authorArgiris Kirtzidis <akyrtzi@gmail.com>
Thu, 4 Nov 2010 03:18:57 +0000 (4 03:18 +0000)
committerArgiris Kirtzidis <akyrtzi@gmail.com>
Thu, 4 Nov 2010 03:18:57 +0000 (4 03:18 +0000)
tree3974473db573a5084f498a88d6f924744da4a0c0
parent7ed541cd38b3ac7dc2f54fde8965afebbe0984e6
Don't instantiate members not belonging in the semantic context of the template.
e.g. for:

    template <int i> class A {
      class B *g;
    };

'class B' has the template as lexical context but semantically it is
introduced in namespace scope.

Fixes rdar://8611125 & http://llvm.org/PR8505

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118235 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateInstantiate.cpp
test/CodeGenCXX/template-instantiation.cpp