summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTDumper.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-02 05:48:29 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-02 05:48:29 +0000
commit5ee3d0080a042c8087f198c037910869e026b469 (patch)
treea36efb1ea6e66ddd96b7f50f2756a788a8e2911b /clang/lib/AST/ASTDumper.cpp
parentbef1f22aaa21a58d3dc68900e6ac1436b8677f64 (diff)
downloadbcm5719-llvm-5ee3d0080a042c8087f198c037910869e026b469.tar.gz
bcm5719-llvm-5ee3d0080a042c8087f198c037910869e026b469.zip
Add the location of Decls to ast dump.
While investigating some debug info issues, Eric and I came across a particular template case where the location of a decl was quite different from the range of the same decl. It might've been rather helpful if the dumper had actually showed us this. llvm-svn: 205396
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
-rw-r--r--clang/lib/AST/ASTDumper.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index ac35a2e43c2..dcfba3e339f 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -792,6 +792,8 @@ void ASTDumper::dumpDecl(const Decl *D) {
OS << " parent " << cast<Decl>(D->getDeclContext());
dumpPreviousDecl(OS, D);
dumpSourceRange(D->getSourceRange());
+ OS << ' ';
+ dumpLocation(D->getLocation());
if (Module *M = D->getOwningModule())
OS << " in " << M->getFullModuleName();
if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
OpenPOWER on IntegriCloud