summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 19:27:12 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 19:27:12 +0000
commit4a9b5fe12f3a6b0201711c0ce7fe03fa04d904c2 (patch)
treed05dd9cf4726c83267b88dad167e23b8eb0ed06f
parent5ad7617cd93b48a67395f532b8483b8ace445ca2 (diff)
downloadchromium_src-4a9b5fe12f3a6b0201711c0ce7fe03fa04d904c2.zip
chromium_src-4a9b5fe12f3a6b0201711c0ce7fe03fa04d904c2.tar.gz
chromium_src-4a9b5fe12f3a6b0201711c0ce7fe03fa04d904c2.tar.bz2
Make chromium-style violations errors if -Werror is set.
This turns on style checking for reals on the bots. Review URL: http://codereview.chromium.org/6531017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76582 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/tools/flip_server/http_interface.h2
-rw-r--r--tools/clang/plugins/ChromeClassTester.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/net/tools/flip_server/http_interface.h b/net/tools/flip_server/http_interface.h
index fa9ceb4..78d3dca 100644
--- a/net/tools/flip_server/http_interface.h
+++ b/net/tools/flip_server/http_interface.h
@@ -69,7 +69,7 @@ class HttpSM : public BalsaVisitorInterface,
void AddToOutputOrder(const MemCacheIter& mci);
void SendOKResponse(uint32 stream_id, std::string* output);
BalsaFrame* spdy_framer() { return http_framer_; }
- void set_is_request() {}
+ virtual void set_is_request() {}
// SMInterface:
virtual void InitSMInterface(SMInterface* sm_spdy_interface,
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp
index 964d2c6..732da68 100644
--- a/tools/clang/plugins/ChromeClassTester.cpp
+++ b/tools/clang/plugins/ChromeClassTester.cpp
@@ -166,7 +166,11 @@ void ChromeClassTester::emitWarning(SourceLocation loc, const char* raw_error) {
std::string err;
err = "[chromium-style] ";
err += raw_error;
- unsigned id = diagnostic().getCustomDiagID(Diagnostic::Warning, err);
+ Diagnostic::Level level =
+ diagnostic().getWarningsAsErrors() ?
+ Diagnostic::Error :
+ Diagnostic::Warning;
+ unsigned id = diagnostic().getCustomDiagID(level, err);
DiagnosticBuilder B = diagnostic().Report(full, id);
}