[cfe-commits] r80386 - /cfe/trunk/lib/AST/DeclPrinter.cpp
Anders Carlsson
andersca at mac.com
Fri Aug 28 12:16:39 PDT 2009
Author: andersca
Date: Fri Aug 28 14:16:39 2009
New Revision: 80386
URL: http://llvm.org/viewvc/llvm-project?rev=80386&view=rev
Log:
Improve support for using decls in the decl printer.
Modified:
cfe/trunk/lib/AST/DeclPrinter.cpp
Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=80386&r1=80385&r2=80386&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Fri Aug 28 14:16:39 2009
@@ -70,6 +70,8 @@
void VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *D);
void VisitObjCPropertyDecl(ObjCPropertyDecl *D);
void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D);
+ void VisitUnresolvedUsingDecl(UnresolvedUsingDecl *D);
+ void VisitUsingDecl(UsingDecl *D);
};
}
@@ -836,3 +838,17 @@
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();
+}
+
+
More information about the cfe-commits
mailing list