Don't try to dump invalid decls or forward decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82827 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp
index 5925112..8d76680 100644
--- a/lib/Frontend/ASTConsumers.cpp
+++ b/lib/Frontend/ASTConsumers.cpp
@@ -543,6 +543,12 @@
if (RD->isDependentType())
continue;
+ if (RD->isInvalidDecl())
+ continue;
+
+ if (!RD->getDefinition(C))
+ continue;
+
// FIXME: Do we really need to hard code this?
if (RD->getQualifiedNameAsString() == "__va_list_tag")
continue;