diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp b/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp index c0f3e17..d8cd40e 100644 --- a/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp +++ b/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp @@ -733,8 +733,10 @@ void DeclPrinter::VisitImportDecl(ImportDecl *D) { void DeclPrinter::VisitStaticAssertDecl(StaticAssertDecl *D) { Out << "static_assert("; D->getAssertExpr()->printPretty(Out, nullptr, Policy, Indentation); - Out << ", "; - D->getMessage()->printPretty(Out, nullptr, Policy, Indentation); + if (StringLiteral *SL = D->getMessage()) { + Out << ", "; + SL->printPretty(Out, nullptr, Policy, Indentation); + } Out << ")"; } |