Fix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.

llvm-svn: 107268
This commit is contained in:
Argyrios Kyrtzidis 2010-06-30 08:49:30 +00:00
parent 4a57bd0d62
commit bd8ac8cf07
3 changed files with 18 additions and 8 deletions

View File

@ -48,7 +48,7 @@ namespace clang {
void VisitNamespaceAliasDecl(NamespaceAliasDecl *D);
void VisitTypeDecl(TypeDecl *TD);
void VisitTypedefDecl(TypedefDecl *TD);
void VisitUnresolvedUsingTypename(UnresolvedUsingTypenameDecl *D);
void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D);
void VisitTagDecl(TagDecl *TD);
void VisitEnumDecl(EnumDecl *ED);
void VisitRecordDecl(RecordDecl *RD);
@ -60,7 +60,7 @@ namespace clang {
void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D);
void VisitValueDecl(ValueDecl *VD);
void VisitEnumConstantDecl(EnumConstantDecl *ECD);
void VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D);
void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D);
void VisitDeclaratorDecl(DeclaratorDecl *DD);
void VisitFunctionDecl(FunctionDecl *FD);
void VisitCXXMethodDecl(CXXMethodDecl *D);
@ -605,14 +605,14 @@ void PCHDeclReader::VisitUsingDirectiveDecl(UsingDirectiveDecl *D) {
Reader.GetDecl(Record[Idx++])));
}
void PCHDeclReader::VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D) {
void PCHDeclReader::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) {
VisitValueDecl(D);
D->setTargetNestedNameRange(Reader.ReadSourceRange(Record, Idx));
D->setUsingLoc(Reader.ReadSourceLocation(Record, Idx));
D->setTargetNestedNameSpecifier(Reader.ReadNestedNameSpecifier(Record, Idx));
}
void PCHDeclReader::VisitUnresolvedUsingTypename(
void PCHDeclReader::VisitUnresolvedUsingTypenameDecl(
UnresolvedUsingTypenameDecl *D) {
VisitTypeDecl(D);
D->setTargetNestedNameRange(Reader.ReadSourceRange(Record, Idx));

View File

@ -49,7 +49,7 @@ namespace clang {
void VisitNamespaceAliasDecl(NamespaceAliasDecl *D);
void VisitTypeDecl(TypeDecl *D);
void VisitTypedefDecl(TypedefDecl *D);
void VisitUnresolvedUsingTypename(UnresolvedUsingTypenameDecl *D);
void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D);
void VisitTagDecl(TagDecl *D);
void VisitEnumDecl(EnumDecl *D);
void VisitRecordDecl(RecordDecl *D);
@ -61,7 +61,7 @@ namespace clang {
void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D);
void VisitValueDecl(ValueDecl *D);
void VisitEnumConstantDecl(EnumConstantDecl *D);
void VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D);
void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D);
void VisitDeclaratorDecl(DeclaratorDecl *D);
void VisitFunctionDecl(FunctionDecl *D);
void VisitCXXMethodDecl(CXXMethodDecl *D);
@ -610,7 +610,7 @@ void PCHDeclWriter::VisitUsingDirectiveDecl(UsingDirectiveDecl *D) {
Code = pch::DECL_USING_DIRECTIVE;
}
void PCHDeclWriter::VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D) {
void PCHDeclWriter::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) {
VisitValueDecl(D);
Writer.AddSourceRange(D->getTargetNestedNameRange(), Record);
Writer.AddSourceLocation(D->getUsingLoc(), Record);
@ -618,7 +618,7 @@ void PCHDeclWriter::VisitUnresolvedUsingValue(UnresolvedUsingValueDecl *D) {
Code = pch::DECL_UNRESOLVED_USING_VALUE;
}
void PCHDeclWriter::VisitUnresolvedUsingTypename(
void PCHDeclWriter::VisitUnresolvedUsingTypenameDecl(
UnresolvedUsingTypenameDecl *D) {
VisitTypeDecl(D);
Writer.AddSourceRange(D->getTargetNestedNameRange(), Record);

View File

@ -55,3 +55,13 @@ inline T make_a(const A1& a1) {
T::depend_declref();
return T(a1);
}
template <class T> class UseBase {
void foo();
typedef int bar;
};
template <class T> class UseA : public UseBase<T> {
using UseBase<T>::foo;
using typename UseBase<T>::bar;
};