gecko-dev/build/build-clang/downgrade-mangling-error.patch
David Major 02b04550c6 Bug 1676669 - Trim some context on downgrade-mangling-error.patch for clang-12 r=firefox-build-system-reviewers,rstewart
Some of the surrounding lines recently changed so the patch refuses to apply. We can live with less context so I'd rather trim it than make a new clang-12 version of this patch.

Differential Revision: https://phabricator.services.mozilla.com/D96725
2020-11-11 16:19:25 +00:00

24 lines
1.1 KiB
Diff

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/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 8b1419074df5..4436cd118f87 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -3847,10 +3847,11 @@ recurse:
if (!NullOut) {
// As bad as this diagnostic is, it's better than crashing.
DiagnosticsEngine &Diags = Context.getDiags();
- unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
+ unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Remark,
"cannot yet mangle expression type %0");
Diags.Report(E->getExprLoc(), DiagID)
<< E->getStmtClassName() << E->getSourceRange();
+ Out << "MOZ_WE_HACKED_AROUND_BUG_1418415";
}
break;
}