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

Unified Diff: tools/clang/plugins/FindBadConstructsAction.cpp

Issue 1709343002: Remove tools/clang (this will break things temporarily). Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/plugins/FindBadConstructsAction.h ('k') | tools/clang/plugins/FindBadConstructsConsumer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/FindBadConstructsAction.cpp
diff --git a/tools/clang/plugins/FindBadConstructsAction.cpp b/tools/clang/plugins/FindBadConstructsAction.cpp
deleted file mode 100644
index 0f6fbd5d61d5d81270a277f51a564d0030a9580f..0000000000000000000000000000000000000000
--- a/tools/clang/plugins/FindBadConstructsAction.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "FindBadConstructsAction.h"
-
-#include "clang/AST/ASTConsumer.h"
-#include "clang/Frontend/FrontendPluginRegistry.h"
-
-#include "FindBadConstructsConsumer.h"
-
-using namespace clang;
-
-namespace chrome_checker {
-
-namespace {
-
-class PluginConsumer : public ASTConsumer {
- public:
- PluginConsumer(CompilerInstance* instance, const Options& options)
- : visitor_(*instance, options) {}
-
- void HandleTranslationUnit(clang::ASTContext& context) override {
- visitor_.TraverseDecl(context.getTranslationUnitDecl());
- }
-
- private:
- FindBadConstructsConsumer visitor_;
-};
-
-} // namespace
-
-FindBadConstructsAction::FindBadConstructsAction() {
-}
-
-std::unique_ptr<ASTConsumer> FindBadConstructsAction::CreateASTConsumer(
- CompilerInstance& instance,
- llvm::StringRef ref) {
- if (options_.with_ast_visitor)
- return llvm::make_unique<PluginConsumer>(&instance, options_);
- return llvm::make_unique<FindBadConstructsConsumer>(instance, options_);
-}
-
-bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance,
- const std::vector<std::string>& args) {
- bool parsed = true;
-
- for (size_t i = 0; i < args.size() && parsed; ++i) {
- if (args[i] == "check-base-classes") {
- // TODO(rsleevi): Remove this once http://crbug.com/123295 is fixed.
- options_.check_base_classes = true;
- } else if (args[i] == "enforce-overriding-blink") {
- options_.enforce_overriding_blink = true;
- } else if (args[i] == "enforce-in-thirdparty-webkit") {
- options_.enforce_in_thirdparty_webkit = true;
- options_.enforce_overriding_blink = true;
- } else if (args[i] == "check-enum-last-value") {
- // TODO(tsepez): Enable this by default once http://crbug.com/356815
- // and http://crbug.com/356816 are fixed.
- options_.check_enum_last_value = true;
- } else if (args[i] == "with-ast-visitor") {
- options_.with_ast_visitor = true;
- } else if (args[i] == "check-templates") {
- options_.check_templates = true;
- } else if (args[i] == "warn-only") {
- options_.warn_only = true;
- } else {
- parsed = false;
- llvm::errs() << "Unknown clang plugin argument: " << args[i] << "\n";
- }
- }
-
- return parsed;
-}
-
-} // namespace chrome_checker
-
-static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X(
- "find-bad-constructs",
- "Finds bad C++ constructs");
« no previous file with comments | « tools/clang/plugins/FindBadConstructsAction.h ('k') | tools/clang/plugins/FindBadConstructsConsumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698