[PATCH] D104031: [clang][deps] Move injection of `-Wno-error` from `clang-scan-deps` to `DependencyScanning` library
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 14 03:23:48 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcf7d9704688d: [clang][deps] Move injection of `-Wno-error` from `clang-scan-deps` to… (authored by jansvoboda11).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104031/new/
https://reviews.llvm.org/D104031
Files:
clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
clang/tools/clang-scan-deps/ClangScanDeps.cpp
Index: clang/tools/clang-scan-deps/ClangScanDeps.cpp
===================================================================
--- clang/tools/clang-scan-deps/ClangScanDeps.cpp
+++ clang/tools/clang-scan-deps/ClangScanDeps.cpp
@@ -504,7 +504,6 @@
}
AdjustedArgs.push_back("-Xclang");
AdjustedArgs.push_back("-sys-header-deps");
- AdjustedArgs.push_back("-Wno-error");
if (!HasResourceDir) {
StringRef ResourceDir =
Index: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
===================================================================
--- clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
+++ clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
@@ -107,6 +107,8 @@
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())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104031.351812.patch
Type: text/x-patch
Size: 1206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210614/d03b592f/attachment.bin>
More information about the cfe-commits
mailing list