Record nested-name-specifiers of when we create

elaborated-type-specifiers. Patch by Enea Zaffanella!

llvm-svn: 102065
This commit is contained in:
Douglas Gregor 2010-04-22 14:24:35 +00:00
parent 9bc5e8f45e
commit 73519609d4
2 changed files with 2 additions and 1 deletions

View File

@ -280,6 +280,7 @@ static QualType ConvertDeclSpecToType(Sema &TheSema,
if (TheSema.getLangOptions().CPlusPlus) {
TagDecl::TagKind Tag
= TagDecl::getTagKindForTypeSpec(DS.getTypeSpecType());
Result = TheSema.getQualifiedNameType(DS.getTypeSpecScope(), Result);
Result = Context.getElaboratedType(Result, Tag);
}

View File

@ -39,7 +39,7 @@ namespace Test0 {
test<2> _1 = (foo)(a);
class Test0::foo b;
test<2> _2 = (foo)(b); // expected-error {{no viable conversion from 'class Test0::foo' to 'class foo' is possible}}
test<2> _2 = (foo)(b); // expected-error {{no viable conversion from 'class Test0::foo' to 'class ::foo' is possible}}
}
}
}