aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-28 19:16:39 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-28 19:16:39 +0000
commitf53eaa59c4936f9b095e69557ce7366b26ca90cb (patch)
tree21a17e7073257726feff647c91afa2902d76ed4e /lib/AST/DeclPrinter.cpp
parent80088a96bd3980e6964654ba655c36d6f01a6961 (diff)
Improve support for using decls in the decl printer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r--lib/AST/DeclPrinter.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index 69144735c9..1dea2238bc 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/lib/AST/DeclPrinter.cpp
@@ -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();
+}
+
+