aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-05-04 10:20:17 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-05-04 10:20:17 +0000
commit0ca43595e9e8dcf62a2ab6f5c7f4666bfb230b6a (patch)
tree682b51b1b1262b1e3db2ad86faa797356a9f2e06 /lib
parent01ebd9d1883e82c4188325900a4eb9c1e16353bb (diff)
Let StmtDumper.cpp handle using declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/StmtDumper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp
index ca62ed12d0..a11e313fa8 100644
--- a/lib/AST/StmtDumper.cpp
+++ b/lib/AST/StmtDumper.cpp
@@ -260,6 +260,13 @@ void StmtDumper::DumpDeclarator(Decl *D) {
else
ns = "<anonymous>";
OS << '"' << UD->getDeclKindName() << ns << ";\"";
+ } else if (UsingDecl *UD = dyn_cast<UsingDecl>(D)) {
+ // print using decl (e.g. "using std::string;")
+ const char *tn = UD->isTypeName() ? "typename " : "";
+ OS << '"' << UD->getDeclKindName() << tn;
+ UD->getTargetNestedNameDecl()->print(OS,
+ PrintingPolicy(UD->getASTContext().getLangOptions()));
+ OS << ";\"";
} else {
assert(0 && "Unexpected decl");
}