forked from OSchip/llvm-project
Handle StaticAssertDecl in DeclContextPrinter
This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 llvm-svn: 290887
This commit is contained in:
parent
a186417796
commit
b44b4cbae8
|
@ -526,6 +526,10 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC,
|
|||
Out << "<var template> " << *cast<VarTemplateDecl>(I) << "\n";
|
||||
break;
|
||||
}
|
||||
case Decl::StaticAssert: {
|
||||
Out << "<static assert>\n";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Out << "DeclKind: " << DK << '"' << I << "\"\n";
|
||||
llvm_unreachable("decl unhandled");
|
||||
|
|
|
@ -63,3 +63,5 @@ private:
|
|||
|
||||
// Variable template
|
||||
template <typename T> T varTemplate = 0;
|
||||
|
||||
static_assert(true, "");
|
||||
|
|
Loading…
Reference in New Issue