| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // A general interface for filtering and only acting on classes in Chromium C++ | 5 // A general interface for filtering and only acting on classes in Chromium C++ |
| 6 // code. | 6 // code. |
| 7 | 7 |
| 8 #include "ChromeClassTester.h" | 8 #include "ChromeClassTester.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // If we're in an invalid location, we're looking at things that aren't | 312 // If we're in an invalid location, we're looking at things that aren't |
| 313 // actually stated in the source. | 313 // actually stated in the source. |
| 314 return false; | 314 return false; |
| 315 } | 315 } |
| 316 | 316 |
| 317 *filename = ploc.getFilename(); | 317 *filename = ploc.getFilename(); |
| 318 return true; | 318 return true; |
| 319 } | 319 } |
| 320 | 320 |
| 321 DiagnosticsEngine::Level ChromeClassTester::getErrorLevel() { | 321 DiagnosticsEngine::Level ChromeClassTester::getErrorLevel() { |
| 322 if (options_.warn_only) | |
| 323 return DiagnosticsEngine::Warning; | |
| 324 | |
| 325 return diagnostic().getWarningsAsErrors() ? DiagnosticsEngine::Error | 322 return diagnostic().getWarningsAsErrors() ? DiagnosticsEngine::Error |
| 326 : DiagnosticsEngine::Warning; | 323 : DiagnosticsEngine::Warning; |
| 327 } | 324 } |
| OLD | NEW |