[cfe-commits] r98721 - in /cfe/trunk: include/clang/Frontend/Utils.h lib/Frontend/CompilerInstance.cpp lib/Frontend/Warnings.cpp
Kovarththanan Rajaratnam
kovarththanan.rajaratnam at gmail.com
Wed Mar 17 02:36:02 PDT 2010
Author: krj
Date: Wed Mar 17 04:36:02 2010
New Revision: 98721
URL: http://llvm.org/viewvc/llvm-project?rev=98721&view=rev
Log:
Simplify ProcessWarningOptions since it can't fail
Modified:
cfe/trunk/include/clang/Frontend/Utils.h
cfe/trunk/lib/Frontend/CompilerInstance.cpp
cfe/trunk/lib/Frontend/Warnings.cpp
Modified: cfe/trunk/include/clang/Frontend/Utils.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/Utils.h?rev=98721&r1=98720&r2=98721&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/Utils.h (original)
+++ cfe/trunk/include/clang/Frontend/Utils.h Wed Mar 17 04:36:02 2010
@@ -59,7 +59,7 @@
/// 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,
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=98721&r1=98720&r2=98721&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Wed Mar 17 04:36:02 2010
@@ -169,8 +169,7 @@
SetUpBuildDumpLog(Opts, Argc, Argv, *Diags);
// Configure our handling of diagnostics.
- if (ProcessWarningOptions(*Diags, Opts))
- return 0;
+ ProcessWarningOptions(*Diags, Opts);
return Diags.take();
}
Modified: cfe/trunk/lib/Frontend/Warnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Warnings.cpp?rev=98721&r1=98720&r2=98721&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Warnings.cpp (original)
+++ cfe/trunk/lib/Frontend/Warnings.cpp Wed Mar 17 04:36:02 2010
@@ -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 @@
if (Diags.setDiagnosticGroupMapping(OptStart, Mapping))
Diags.Report(diag::warn_unknown_warning_option) << ("-W" + Opt);
}
-
- return false;
}
More information about the cfe-commits
mailing list