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

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

Issue 1493813003: Convert the no-inline-virtuals rule into a constructors rule. Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Rebase onto https://codereview.chromium.org/1504033010 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
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 #include "FindBadConstructsAction.h" 5 #include "FindBadConstructsAction.h"
6 6
7 #include "clang/AST/ASTConsumer.h" 7 #include "clang/AST/ASTConsumer.h"
8 #include "clang/Frontend/FrontendPluginRegistry.h" 8 #include "clang/Frontend/FrontendPluginRegistry.h"
9 9
10 #include "FindBadConstructsConsumer.h" 10 #include "FindBadConstructsConsumer.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } else if (args[i] == "check-enum-last-value") { 54 } else if (args[i] == "check-enum-last-value") {
55 // TODO(tsepez): Enable this by default once http://crbug.com/356815 55 // TODO(tsepez): Enable this by default once http://crbug.com/356815
56 // and http://crbug.com/356816 are fixed. 56 // and http://crbug.com/356816 are fixed.
57 options_.check_enum_last_value = true; 57 options_.check_enum_last_value = true;
58 } else if (args[i] == "with-ast-visitor") { 58 } else if (args[i] == "with-ast-visitor") {
59 options_.with_ast_visitor = true; 59 options_.with_ast_visitor = true;
60 } else if (args[i] == "check-templates") { 60 } else if (args[i] == "check-templates") {
61 options_.check_templates = true; 61 options_.check_templates = true;
62 } else if (args[i] == "follow-macro-expansion") { 62 } else if (args[i] == "follow-macro-expansion") {
63 options_.follow_macro_expansion = true; 63 options_.follow_macro_expansion = true;
64 } else if (args[i] == "treat-virtuals-as-complexity") {
65 // TODO(jyasskin): Enable this by default once https://crbug.com/565523 is
66 // fixed.
67 options_.treat_virtuals_as_complexity = true;
64 } else { 68 } else {
65 parsed = false; 69 parsed = false;
66 llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n"; 70 llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n";
67 } 71 }
68 } 72 }
69 73
70 return parsed; 74 return parsed;
71 } 75 }
72 76
73 } // namespace chrome_checker 77 } // namespace chrome_checker
74 78
75 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X( 79 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X(
76 "find-bad-constructs", 80 "find-bad-constructs",
77 "Finds bad C++ constructs"); 81 "Finds bad C++ constructs");
OLDNEW
« no previous file with comments | « no previous file | tools/clang/plugins/FindBadConstructsConsumer.h » ('j') | tools/clang/plugins/FindBadConstructsConsumer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698