summaryrefslogtreecommitdiffstats
path: root/tools/clang
diff options
context:
space:
mode:
authorDaniel Cheng <dcheng@chromium.org>2015-04-16 11:26:40 -0700
committerDaniel Cheng <dcheng@chromium.org>2015-04-16 18:28:22 +0000
commitddb810597d4461433a201f47d9382274d49de95d (patch)
treea4c656a3e1682bb7079e69ef773dd85b870d0f19 /tools/clang
parent722d8721501c1950f1f4d682ec2cf0c312c3865d (diff)
downloadchromium_src-ddb810597d4461433a201f47d9382274d49de95d.zip
chromium_src-ddb810597d4461433a201f47d9382274d49de95d.tar.gz
chromium_src-ddb810597d4461433a201f47d9382274d49de95d.tar.bz2
Force another diagnostic reporting path to be warn-only on Windows.
BUG=467287 R=thakis@chromium.org Review URL: https://codereview.chromium.org/1095433005 Cr-Commit-Position: refs/heads/master@{#325481}
Diffstat (limited to 'tools/clang')
-rw-r--r--tools/clang/plugins/ChromeClassTester.cpp4
-rw-r--r--tools/clang/plugins/FindBadConstructsConsumer.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp
index e9a0bca..b9d49c3 100644
--- a/tools/clang/plugins/ChromeClassTester.cpp
+++ b/tools/clang/plugins/ChromeClassTester.cpp
@@ -95,9 +95,13 @@ void ChromeClassTester::emitWarning(SourceLocation loc,
std::string err;
err = "[chromium-style] ";
err += raw_error;
+ // TODO(dcheng): Re-enable -Werror for these diagnostics on Windows once all
+ // the pre-existing warnings are cleaned up. https://crbug.com/467287
DiagnosticIDs::Level level =
+#if !defined(LLVM_ON_WIN32)
diagnostic().getWarningsAsErrors() ?
DiagnosticIDs::Error :
+#endif
DiagnosticIDs::Warning;
unsigned id = diagnostic().getDiagnosticIDs()->getCustomDiagID(level, err);
DiagnosticBuilder builder = diagnostic().Report(full, id);
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
index 4c40d52..2524550 100644
--- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
+++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -560,8 +560,8 @@ FindBadConstructsConsumer::CheckRecordForRefcountIssue(
// -Werror.
DiagnosticsEngine::Level FindBadConstructsConsumer::getErrorLevel() {
#if defined(LLVM_ON_WIN32)
- // Only warn on Windows, since there are a lot of potential pre-existing
- // issues.
+ // 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