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

Side by Side Diff: tools/clang/plugins/ChromeClassTester.cpp

Issue 1486813002: Clang style plugin: remove 'warn-only' option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/clang/plugins/FindBadConstructsAction.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | tools/clang/plugins/FindBadConstructsAction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698