Require a complete type when performing the qualified lookup during

instantiation of a dependent elaborated type specifier.  Fixes PR 7199.

llvm-svn: 104822
This commit is contained in:
John McCall 2010-05-27 06:40:31 +00:00
parent f9d147bddb
commit bf8c519a0d
2 changed files with 12 additions and 0 deletions

View File

@ -582,6 +582,9 @@ public:
if (!DC)
return QualType();
if (SemaRef.RequireCompleteDeclContext(SS, DC))
return QualType();
TagDecl *Tag = 0;
SemaRef.LookupQualifiedName(Result, DC);
switch (Result.getResultKind()) {

View File

@ -119,3 +119,12 @@ namespace PR7080 {
bool x = X<int, rv<int>&>::value;
}
namespace pr7199 {
template <class T> class A; // expected-note {{template is declared here}}
template <class T> class B {
class A<T>::C field; // expected-error {{implicit instantiation of undefined template 'pr7199::A<int>'}}
};
template class B<int>; // expected-note {{in instantiation}}
}