From: Argyrios Kyrtzidis Date: Sat, 28 Jan 2012 04:35:52 +0000 (+0000) Subject: DiagnosticsEngine::setMappingToAllDiagnostics() does not need to return bool, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82e6411d004064a29f03a3ea8b8919f297bfa843;p=clang DiagnosticsEngine::setMappingToAllDiagnostics() does not need to return bool, caught by Chad. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149173 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index c587a1d6e2..3aa1d55c10 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -479,7 +479,7 @@ public: /// \brief Add the specified mapping to all diagnostics. Mainly to be used /// by -Wno-everything to disable all warnings but allow subsequent -W options /// to enable specific warnings. - bool setMappingToAllDiagnostics(diag::Mapping Map, + void setMappingToAllDiagnostics(diag::Mapping Map, SourceLocation Loc = SourceLocation()); bool hasErrorOccurred() const { return ErrorOccurred; } diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index eab79d6442..369c32dc12 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -295,7 +295,7 @@ bool DiagnosticsEngine::setDiagnosticGroupErrorAsFatal(StringRef Group, return false; } -bool DiagnosticsEngine::setMappingToAllDiagnostics(diag::Mapping Map, +void DiagnosticsEngine::setMappingToAllDiagnostics(diag::Mapping Map, SourceLocation Loc) { // Get all the diagnostics. llvm::SmallVector AllDiags; @@ -305,8 +305,6 @@ bool DiagnosticsEngine::setMappingToAllDiagnostics(diag::Mapping Map, for (unsigned i = 0, e = AllDiags.size(); i != e; ++i) if (Diags->isBuiltinWarningOrExtension(AllDiags[i])) setDiagnosticMapping(AllDiags[i], Map, Loc); - - return false; } void DiagnosticsEngine::Report(const StoredDiagnostic &storedDiag) {