gecko-dev/build/build-clang/downgrade-mangling-error_clang_12.patch
David Major 219799577d Bug 1694280 - Add clang 12.0.0 rc2 toolchains (not yet used) r=firefox-build-system-reviewers,glandium
Just adding the toolchain tasks for now. They are not yet used by anything, but bug 1693288 might be interested eventually.

As with earlier releases, clang-tidy and mingw builds are not included here, they'll be separate patches.

Differential Revision: https://phabricator.services.mozilla.com/D106554
2021-03-03 16:53:28 +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 4420f6a2c1c3..4d9a6434d245 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -4028,10 +4028,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";
return;
}
break;