summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/TextNodeDumper.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2019-01-19 09:05:55 +0000
committerStephen Kelly <steveire@gmail.com>2019-01-19 09:05:55 +0000
commit25f18bfd4f5481cd91f09aeb6ed48334940f3e9a (patch)
tree1d2dcebd23fa21deae64cf07a1e0290092ef79bc /clang/lib/AST/TextNodeDumper.cpp
parent2946cd701067404b99c39fb29dc9c74bd7193eb3 (diff)
downloadbcm5719-llvm-25f18bfd4f5481cd91f09aeb6ed48334940f3e9a.tar.gz
bcm5719-llvm-25f18bfd4f5481cd91f09aeb6ed48334940f3e9a.zip
Move decl context dumping to TextNodeDumper
Summary: Only an obscure case is moved. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56829 llvm-svn: 351637
Diffstat (limited to 'clang/lib/AST/TextNodeDumper.cpp')
-rw-r--r--clang/lib/AST/TextNodeDumper.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index ca2d6b2d057..06beb77f7a9 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -255,6 +255,17 @@ void TextNodeDumper::Visit(const Decl *D) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
if (FD->isConstexpr())
OS << " constexpr";
+
+ if (!isa<FunctionDecl>(*D)) {
+ const auto *MD = dyn_cast<ObjCMethodDecl>(D);
+ if (!MD || !MD->isThisDeclarationADefinition()) {
+ const auto *DC = dyn_cast<DeclContext>(D);
+ if (DC && DC->hasExternalLexicalStorage()) {
+ ColorScope Color(OS, ShowColors, UndeserializedColor);
+ OS << " <undeserialized declarations>";
+ }
+ }
+ }
}
void TextNodeDumper::Visit(const CXXCtorInitializer *Init) {
OpenPOWER on IntegriCloud