Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: tools/clang/plugins/FindBadConstructsConsumer.cpp

Issue 1117163002: Clang style plugin: add warn-only option and use it on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/clang/plugins/FindBadConstructsConsumer.cpp
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
index 20919a41afd7afb98a90211160b36d23cccacac7..4dc305e4a4e3d61bd751ce65f44812348e8335bc 100644
--- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
+++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -101,7 +101,7 @@ bool IsPodOrTemplateType(const CXXRecordDecl& record) {
FindBadConstructsConsumer::FindBadConstructsConsumer(CompilerInstance& instance,
const Options& options)
- : ChromeClassTester(instance), options_(options) {
+ : ChromeClassTester(instance, options) {
// Messages for virtual method specifiers.
diag_method_requires_override_ =
diagnostic().getCustomDiagID(getErrorLevel(), kMethodRequiresOverride);
@@ -593,19 +593,6 @@ FindBadConstructsConsumer::CheckRecordForRefcountIssue(
return None;
}
-// Adds either a warning or error, based on the current handling of
-// -Werror.
-DiagnosticsEngine::Level FindBadConstructsConsumer::getErrorLevel() {
-#if defined(LLVM_ON_WIN32)
- // TODO(dcheng): Re-enable -Werror for these diagnostics on Windows once all
- // the pre-existing warnings are cleaned up. https://crbug.com/467287
- return DiagnosticsEngine::Warning;
-#else
- return diagnostic().getWarningsAsErrors() ? DiagnosticsEngine::Error
- : DiagnosticsEngine::Warning;
-#endif
-}
-
// Returns true if |base| specifies one of the Chromium reference counted
// classes (base::RefCounted / base::RefCountedThreadSafe).
bool FindBadConstructsConsumer::IsRefCountedCallback(

Powered by Google App Engine
This is Rietveld 408576698