summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-11-17 05:59:44 +0000
committerJohn McCall <rjmccall@apple.com>2009-11-17 05:59:44 +0000
commit3f746828d70bda31d6b19c07d430a569ad0e6048 (patch)
tree5187989d82f6729fdc92b34166bebb05d5396a86 /clang/lib/AST/DeclPrinter.cpp
parentd6ea9028e7ebbb779b04fc961a0c5907a86dd7f7 (diff)
downloadbcm5719-llvm-3f746828d70bda31d6b19c07d430a569ad0e6048.tar.gz
bcm5719-llvm-3f746828d70bda31d6b19c07d430a569ad0e6048.zip
Instead of hanging a using declaration's target decls directly off the using
decl, create shadow declarations and put them in scope like normal. Work in progress. llvm-svn: 89048
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index b88a971f1ec..199ed356d6d 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -73,6 +73,7 @@ namespace {
void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D);
void VisitUnresolvedUsingDecl(UnresolvedUsingDecl *D);
void VisitUsingDecl(UsingDecl *D);
+ void VisitUsingShadowDecl(UsingShadowDecl *D);
};
}
@@ -825,7 +826,7 @@ void DeclPrinter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *PID) {
void DeclPrinter::VisitUsingDecl(UsingDecl *D) {
Out << "using ";
D->getTargetNestedNameDecl()->print(Out, Policy);
- Out << D->getTargetDecl()->getNameAsString();
+ Out << D->getNameAsString();
}
void DeclPrinter::VisitUnresolvedUsingDecl(UnresolvedUsingDecl *D) {
@@ -833,3 +834,7 @@ void DeclPrinter::VisitUnresolvedUsingDecl(UnresolvedUsingDecl *D) {
D->getTargetNestedNameSpecifier()->print(Out, Policy);
Out << D->getTargetName().getAsString();
}
+
+void DeclPrinter::VisitUsingShadowDecl(UsingShadowDecl *D) {
+ // ignore
+}
OpenPOWER on IntegriCloud