[clang][Driver] Don't overwrite `DiagnosticsEngine::IgnoreAllWarnings`, rely...
[clang][Driver] Don't overwrite `DiagnosticsEngine::IgnoreAllWarnings`, rely on `DiagnosticOptions::IgnoreWarnings` value. Driver overwrites `DiagnosticsEngine::IgnoreAllWarnings` based on `-w` flag without taking into account `DiagnosticOptions::IgnoreWarnings` that is propagated to `DiagnosticsEngine` in `ProcessWarningOptions` (called from `CompilerInstance::createDiagnostics`). It makes it hard to manipulate `DiagnosticOptions` directly and pushes towards string-based API. Most of in-tree tools use `DiagnosticOptions` already, so migrate `clang_parseTranslationUnit_Impl` to use it too. Don't parse `-w` directly but rely on ``` def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>, MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>; ``` Allows to reland D138252. Differential Revision: https://reviews.llvm.org/D138970
Loading
Please sign in to comment