diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp --- a/clang/lib/AST/JSONNodeDumper.cpp +++ b/clang/lib/AST/JSONNodeDumper.cpp @@ -74,6 +74,7 @@ JOS.attribute("kind", (llvm::Twine(T->getTypeClassName()) + "Type").str()); JOS.attribute("type", createQualType(QualType(T, 0), /*Desugar*/ false)); + attributeOnlyIfTrue("containsErrors", T->containsErrors()); attributeOnlyIfTrue("isDependent", T->isDependentType()); attributeOnlyIfTrue("isInstantiationDependent", T->isInstantiationDependentType()); diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp --- a/clang/lib/AST/TextNodeDumper.cpp +++ b/clang/lib/AST/TextNodeDumper.cpp @@ -202,6 +202,9 @@ if (SingleStepDesugar != QualType(T, 0)) OS << " sugar"; + if (T->containsErrors()) + OS << " contains-errors"; + if (T->isDependentType()) OS << " dependent"; else if (T->isInstantiationDependentType())