зеркало из https://github.com/microsoft/clang-1.git
Simplify ProcessWarningOptions since it can't fail
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98721 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
ce45414dd8
Коммит
5bf932bd0d
|
@ -59,7 +59,7 @@ void InitializePreprocessor(Preprocessor &PP,
|
|||
|
||||
/// ProcessWarningOptions - Initialize the diagnostic client and process the
|
||||
/// warning options specified on the command line.
|
||||
bool ProcessWarningOptions(Diagnostic &Diags, const DiagnosticOptions &Opts);
|
||||
void ProcessWarningOptions(Diagnostic &Diags, const DiagnosticOptions &Opts);
|
||||
|
||||
/// DoPrintPreprocessedInput - Implement -E mode.
|
||||
void DoPrintPreprocessedInput(Preprocessor &PP, llvm::raw_ostream* OS,
|
||||
|
|
|
@ -169,8 +169,7 @@ Diagnostic *CompilerInstance::createDiagnostics(const DiagnosticOptions &Opts,
|
|||
SetUpBuildDumpLog(Opts, Argc, Argv, *Diags);
|
||||
|
||||
// Configure our handling of diagnostics.
|
||||
if (ProcessWarningOptions(*Diags, Opts))
|
||||
return 0;
|
||||
ProcessWarningOptions(*Diags, Opts);
|
||||
|
||||
return Diags.take();
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <algorithm>
|
||||
using namespace clang;
|
||||
|
||||
bool clang::ProcessWarningOptions(Diagnostic &Diags,
|
||||
void clang::ProcessWarningOptions(Diagnostic &Diags,
|
||||
const DiagnosticOptions &Opts) {
|
||||
Diags.setSuppressSystemWarnings(true); // Default to -Wno-system-headers
|
||||
Diags.setIgnoreAllWarnings(Opts.IgnoreWarnings);
|
||||
|
@ -122,6 +122,4 @@ bool clang::ProcessWarningOptions(Diagnostic &Diags,
|
|||
if (Diags.setDiagnosticGroupMapping(OptStart, Mapping))
|
||||
Diags.Report(diag::warn_unknown_warning_option) << ("-W" + Opt);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче