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

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

Issue 1554533002: Mark methods with override in pdf/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Clang plugin flag Created 4 years, 11 months 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 | « tools/clang/plugins/ChromeClassTester.cpp ('k') | tools/clang/plugins/Options.h » ('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 #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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance, 44 bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance,
45 const std::vector<std::string>& args) { 45 const std::vector<std::string>& args) {
46 bool parsed = true; 46 bool parsed = true;
47 47
48 for (size_t i = 0; i < args.size() && parsed; ++i) { 48 for (size_t i = 0; i < args.size() && parsed; ++i) {
49 if (args[i] == "check-base-classes") { 49 if (args[i] == "check-base-classes") {
50 // TODO(rsleevi): Remove this once http://crbug.com/123295 is fixed. 50 // TODO(rsleevi): Remove this once http://crbug.com/123295 is fixed.
51 options_.check_base_classes = true; 51 options_.check_base_classes = true;
52 } else if (args[i] == "enforce-in-pdf") {
53 options_.enforce_in_thirdparty_pdf = true;
Nico 2015/12/29 19:57:25 the flag is called enforce_in_pdf (no thirdparty_)
Lei Zhang 2015/12/29 20:00:17 copy + pasting is hard :(
Nico 2016/08/22 19:24:02 You never turned on this flag -- are you still pla
52 } else if (args[i] == "enforce-in-thirdparty-webkit") { 54 } else if (args[i] == "enforce-in-thirdparty-webkit") {
53 options_.enforce_in_thirdparty_webkit = true; 55 options_.enforce_in_thirdparty_webkit = true;
54 } else if (args[i] == "check-enum-last-value") { 56 } else if (args[i] == "check-enum-last-value") {
55 // TODO(tsepez): Enable this by default once http://crbug.com/356815 57 // TODO(tsepez): Enable this by default once http://crbug.com/356815
56 // and http://crbug.com/356816 are fixed. 58 // and http://crbug.com/356816 are fixed.
57 options_.check_enum_last_value = true; 59 options_.check_enum_last_value = true;
58 } else if (args[i] == "with-ast-visitor") { 60 } else if (args[i] == "with-ast-visitor") {
59 options_.with_ast_visitor = true; 61 options_.with_ast_visitor = true;
60 } else if (args[i] == "check-templates") { 62 } else if (args[i] == "check-templates") {
61 options_.check_templates = true; 63 options_.check_templates = true;
62 } else if (args[i] == "follow-macro-expansion") { 64 } else if (args[i] == "follow-macro-expansion") {
63 options_.follow_macro_expansion = true; 65 options_.follow_macro_expansion = true;
64 } else { 66 } else {
65 parsed = false; 67 parsed = false;
66 llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n"; 68 llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n";
67 } 69 }
68 } 70 }
69 71
70 return parsed; 72 return parsed;
71 } 73 }
72 74
73 } // namespace chrome_checker 75 } // namespace chrome_checker
74 76
75 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X( 77 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X(
76 "find-bad-constructs", 78 "find-bad-constructs",
77 "Finds bad C++ constructs"); 79 "Finds bad C++ constructs");
OLDNEW
« no previous file with comments | « tools/clang/plugins/ChromeClassTester.cpp ('k') | tools/clang/plugins/Options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698