[cfe-commits] r103006 - /cfe/trunk/lib/AST/StmtDumper.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Tue May 4 03:20:17 PDT 2010
Author: cornedbee
Date: Tue May 4 05:20:17 2010
New Revision: 103006
URL: http://llvm.org/viewvc/llvm-project?rev=103006&view=rev
Log:
Let StmtDumper.cpp handle using declarations.
Modified:
cfe/trunk/lib/AST/StmtDumper.cpp
Modified: cfe/trunk/lib/AST/StmtDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtDumper.cpp?rev=103006&r1=103005&r2=103006&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtDumper.cpp (original)
+++ cfe/trunk/lib/AST/StmtDumper.cpp Tue May 4 05:20:17 2010
@@ -260,6 +260,13 @@
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");
}
More information about the cfe-commits
mailing list