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

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

Issue 2749043004: Clang plugin: Support for Blink in web/. (Closed)
Patch Set: Created 3 years, 9 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
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 29 matching lines...) Expand all
40 } 40 }
41 41
42 bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance, 42 bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance,
43 const std::vector<std::string>& args) { 43 const std::vector<std::string>& args) {
44 bool parsed = true; 44 bool parsed = true;
45 45
46 for (size_t i = 0; i < args.size() && parsed; ++i) { 46 for (size_t i = 0; i < args.size() && parsed; ++i) {
47 if (args[i] == "check-base-classes") { 47 if (args[i] == "check-base-classes") {
48 // TODO(rsleevi): Remove this once http://crbug.com/123295 is fixed. 48 // TODO(rsleevi): Remove this once http://crbug.com/123295 is fixed.
49 options_.check_base_classes = true; 49 options_.check_base_classes = true;
50 } else if (args[i] == "enforce-in-thirdparty-webkit") { 50 } else if (args[i] == "enforce-in-blink") {
51 options_.enforce_in_thirdparty_webkit = true; 51 options_.enforce_in_blink = true;
52 } else if (args[i] == "check-enum-last-value") { 52 } else if (args[i] == "check-enum-last-value") {
53 // TODO(tsepez): Enable this by default once http://crbug.com/356815 53 // TODO(tsepez): Enable this by default once http://crbug.com/356815
54 // and http://crbug.com/356816 are fixed. 54 // and http://crbug.com/356816 are fixed.
55 options_.check_enum_last_value = true; 55 options_.check_enum_last_value = true;
56 } else if (args[i] == "no-realpath") { 56 } else if (args[i] == "no-realpath") {
57 options_.no_realpath = true; 57 options_.no_realpath = true;
58 } else if (args[i] == "check-ipc") { 58 } else if (args[i] == "check-ipc") {
59 options_.check_ipc = true; 59 options_.check_ipc = true;
60 } else if (args[i] == "check-auto-raw-pointer") { 60 } else if (args[i] == "check-auto-raw-pointer") {
61 // This flag is deprecated and will be removed once Chromium builds aren't 61 // This flag is deprecated and will be removed once Chromium builds aren't
62 // using it. http://crbug.com/554600. 62 // using it. http://crbug.com/554600.
63 } else { 63 } else {
64 parsed = false; 64 parsed = false;
65 llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n"; 65 llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n";
66 } 66 }
67 } 67 }
68 68
69 return parsed; 69 return parsed;
70 } 70 }
71 71
72 } // namespace chrome_checker 72 } // namespace chrome_checker
73 73
74 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X( 74 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X(
75 "find-bad-constructs", 75 "find-bad-constructs",
76 "Finds bad C++ constructs"); 76 "Finds bad C++ constructs");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698