[Frontend] Don't enable EmbeddedRestrictions warnings under -suppress-warnings

Fixes #84697.
This commit is contained in:
Doug Gregor
2025-10-07 16:20:34 -07:00
parent 77617c93c0
commit 151415b550
2 changed files with 4 additions and 2 deletions

View File

@@ -2646,7 +2646,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
// If the "embedded" flag was provided, enable the EmbeddedRestrictions
// warning group. This group is opt-in in non-Embedded builds.
if (isEmbedded(Args)) {
if (isEmbedded(Args) && !Args.hasArg(OPT_suppress_warnings)) {
Opts.WarningsAsErrorsRules.push_back(
WarningAsErrorRule(WarningAsErrorRule::Action::Disable,
"EmbeddedRestrictions"));