]> granicus.if.org Git - clang/commit
Don't instantiate members not belonging in the semantic context of the template.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 4 Nov 2010 03:18:57 +0000 (03:18 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 4 Nov 2010 03:18:57 +0000 (03:18 +0000)
commitbb5e431bf187a9f3cabb72045694fbaea414a702
tree3974473db573a5084f498a88d6f924744da4a0c0
parent0c8209e40b405fd32f047e95aafdc94054406a58
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