summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorEnea Zaffanella <zaffanella@cs.unipr.it>2013-07-17 17:28:56 +0000
committerEnea Zaffanella <zaffanella@cs.unipr.it>2013-07-17 17:28:56 +0000
commitc70b2519d5a9d1e612674bd78cb70ec350b101d1 (patch)
tree4cd0aa38e596025a11b2b8016e9d598f1a7b77cd /clang/lib/AST/DeclPrinter.cpp
parent5f6c173e7cb4f6a74c1aec2af3ae478a995c140d (diff)
downloadbcm5719-llvm-c70b2519d5a9d1e612674bd78cb70ec350b101d1.tar.gz
bcm5719-llvm-c70b2519d5a9d1e612674bd78cb70ec350b101d1.zip
Fixed source range of C++03 access declarations.
llvm-svn: 186522
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index e738ff2b87a..c3603038be3 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -1155,7 +1155,10 @@ void DeclPrinter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *PID) {
}
void DeclPrinter::VisitUsingDecl(UsingDecl *D) {
- Out << "using ";
+ if (!D->isAccessDeclaration())
+ Out << "using ";
+ if (D->isTypeName())
+ Out << "typename ";
D->getQualifier()->print(Out, Policy);
Out << *D;
}
@@ -1168,7 +1171,8 @@ DeclPrinter::VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D) {
}
void DeclPrinter::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) {
- Out << "using ";
+ if (!D->isAccessDeclaration())
+ Out << "using ";
D->getQualifier()->print(Out, Policy);
Out << D->getName();
}
OpenPOWER on IntegriCloud