This moves another piece of logic specific to `clang-scan-deps` into the `DependencyScanning` library. This makes it easier to check how the original command-line looked like in the library and will enable the library to stop inventing `-Wno-error` for modular dependencies (see D104036).
Reviewed By: arphaman
Differential Revision: https://reviews.llvm.org/D104031
Compiler.getDiagnosticOpts().ShowCarets = false;
// Don't write out diagnostic file.
Compiler.getDiagnosticOpts().DiagnosticSerializationFile.clear();
+ // Don't treat warnings as errors.
+ Compiler.getDiagnosticOpts().Warnings.push_back("no-error");
// Create the compiler's actual diagnostics engine.
Compiler.createDiagnostics(DiagConsumer, /*ShouldOwnClient=*/false);
if (!Compiler.hasDiagnostics())
}
AdjustedArgs.push_back("-Xclang");
AdjustedArgs.push_back("-sys-header-deps");
- AdjustedArgs.push_back("-Wno-error");
if (!HasResourceDir) {
StringRef ResourceDir =