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:
Kovarththanan Rajaratnam 2010-03-17 09:36:02 +00:00
Родитель ce45414dd8
Коммит 5bf932bd0d
3 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -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;
}