diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-13 02:24:47 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-13 02:24:47 +0000 |
commit | 71b09acb73338b8c757cc0e9f9f553717c3fe7b3 (patch) | |
tree | e0d3466a75ec602d716d9a024c3ec405861c7894 /clang/lib/AST/ASTDumper.cpp | |
parent | db4ed0bdabc9f61fbd373be416375e38bf1acb27 (diff) | |
download | bcm5719-llvm-71b09acb73338b8c757cc0e9f9f553717c3fe7b3.tar.gz bcm5719-llvm-71b09acb73338b8c757cc0e9f9f553717c3fe7b3.zip |
Extend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag in the right place.
llvm-svn: 210872
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
-rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index 5709fb4afea..9ece41d4b30 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -807,6 +807,12 @@ void ASTDumper::dumpDecl(const Decl *D) { OS << " hidden"; if (D->isImplicit()) OS << " implicit"; + if (D->isUsed()) + OS << " used"; + else if (D->isReferenced()) + OS << " referenced"; + if (D->isInvalidDecl()) + OS << " invalid"; bool HasAttrs = D->hasAttrs(); const FullComment *Comment = @@ -830,9 +836,6 @@ void ASTDumper::dumpDecl(const Decl *D) { lastChild(); dumpFullComment(Comment); - if (D->isInvalidDecl()) - OS << " invalid"; - setMoreChildren(false); if (HasDeclContext) dumpDeclContext(cast<DeclContext>(D)); |