[PATCH] D138970: [clang][Driver] Don't overwrite `DiagnosticsEngine::IgnoreAllWarnings`, rely on `DiagnosticOptions::IgnoreWarnings` value.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 2 11:59:44 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb4b54697b7aa: [clang][Driver] Don't overwrite `DiagnosticsEngine::IgnoreAllWarnings`, rely on… (authored by vsapsai).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138970/new/
https://reviews.llvm.org/D138970
Files:
clang/lib/Driver/Driver.cpp
clang/tools/libclang/CIndex.cpp
Index: clang/tools/libclang/CIndex.cpp
===================================================================
--- clang/tools/libclang/CIndex.cpp
+++ clang/tools/libclang/CIndex.cpp
@@ -3797,8 +3797,10 @@
}
// Configure the diagnostics.
+ std::unique_ptr<DiagnosticOptions> DiagOpts = CreateAndPopulateDiagOpts(
+ llvm::makeArrayRef(command_line_args, num_command_line_args));
IntrusiveRefCntPtr<DiagnosticsEngine> Diags(
- CompilerInstance::createDiagnostics(new DiagnosticOptions));
+ CompilerInstance::createDiagnostics(DiagOpts.release()));
if (options & CXTranslationUnit_KeepGoing)
Diags->setFatalsAsError(true);
Index: clang/lib/Driver/Driver.cpp
===================================================================
--- clang/lib/Driver/Driver.cpp
+++ clang/lib/Driver/Driver.cpp
@@ -1211,9 +1211,6 @@
// FIXME: This stuff needs to go into the Compilation, not the driver.
bool CCCPrintPhases;
- // Silence driver warnings if requested
- Diags.setIgnoreAllWarnings(Args.hasArg(options::OPT_w));
-
// -canonical-prefixes, -no-canonical-prefixes are used very early in main.
Args.ClaimAllArgs(options::OPT_canonical_prefixes);
Args.ClaimAllArgs(options::OPT_no_canonical_prefixes);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138970.479705.patch
Type: text/x-patch
Size: 1239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221202/ce563877/attachment.bin>
More information about the cfe-commits
mailing list