Improve support for using decls in the decl printer.

llvm-svn: 80386
This commit is contained in:
Anders Carlsson 2009-08-28 19:16:39 +00:00
parent 2dde6bb80e
commit df5a1c8b5d
1 changed files with 16 additions and 0 deletions

View File

@ -70,6 +70,8 @@ namespace {
void VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *D);
void VisitObjCPropertyDecl(ObjCPropertyDecl *D);
void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D);
void VisitUnresolvedUsingDecl(UnresolvedUsingDecl *D);
void VisitUsingDecl(UsingDecl *D);
};
}
@ -836,3 +838,17 @@ void DeclPrinter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *PID) {
if (PID->getPropertyIvarDecl())
Out << "=" << PID->getPropertyIvarDecl()->getNameAsString();
}
void DeclPrinter::VisitUsingDecl(UsingDecl *D) {
Out << "using ";
D->getTargetNestedNameDecl()->print(Out, Policy);
Out << D->getTargetDecl()->getNameAsString();
}
void DeclPrinter::VisitUnresolvedUsingDecl(UnresolvedUsingDecl *D) {
Out << "using ";
D->getTargetNestedNameSpecifier()->print(Out, Policy);
Out << D->getTargetName().getAsString();
}