Skip to content

Commit 7837a3d

Browse files
authored
Merge pull request #28142 from nkcsgexi/werror-to-clang-importer
ClangImporter: pass down -warnings-as-errors to clang invocation
2 parents c8465f1 + a06824d commit 7837a3d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,8 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
600600
Opts.PCHDisableValidation |= Args.hasArg(OPT_pch_disable_validation);
601601
}
602602

603+
if (Args.hasArg(OPT_warnings_as_errors))
604+
Opts.ExtraArgs.push_back("-Werror");
603605
Opts.DebuggerSupport |= Args.hasArg(OPT_debugger_support);
604606
return false;
605607
}

0 commit comments

Comments
 (0)