Downgrade unimplemented mangling diagnostic from error to note. This codepath is exercised by MozsearchIndexer.cpp (the searchfox indexer) when indexing on Windows. We can do without having the unimplemented bits for now as long the compiler doesn't fail the build. See also https://bugs.llvm.org/show_bug.cgi?id=39294 diff --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td index bde418695f64..a32a95eca9e1 100644 --- a/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -1052,6 +1052,10 @@ def err_unsupported_itanium_mangling : Error< "containing a substitution failure}" "}0">; +def remark_unsupported_itanium_expr_mangling : Remark< + "cannot yet mangle %0 expression">, + InGroup>; + def err_unsupported_itanium_expr_mangling : Error< "cannot yet mangle %0 expression">; diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index d1280f21a000..9dd1a66a0836 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -5053,8 +5053,9 @@ recurse: if (!NullOut) { // As bad as this diagnostic is, it's better than crashing. DiagnosticsEngine &Diags = Context.getDiags(); - Diags.Report(E->getExprLoc(), diag::err_unsupported_itanium_expr_mangling) + Diags.Report(E->getExprLoc(), diag::remark_unsupported_itanium_expr_mangling) << E->getStmtClassName() << E->getSourceRange(); + Out << "MOZ_WE_HACKED_AROUND_BUG_1418415"; return; } break;