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

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

Issue 578623002: Roll Clang 214024:216630 (+216684) and switch to CMake (try 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/FindBadConstructsAction.h ('k') | tools/clang/plugins/Makefile » ('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/Frontend/FrontendPluginRegistry.h" 7 #include "clang/Frontend/FrontendPluginRegistry.h"
8 8
9 #include "FindBadConstructsConsumer.h" 9 #include "FindBadConstructsConsumer.h"
10 10
11 using namespace clang; 11 using namespace clang;
12 12
13 namespace chrome_checker { 13 namespace chrome_checker {
14 14
15 FindBadConstructsAction::FindBadConstructsAction() { 15 FindBadConstructsAction::FindBadConstructsAction() {
16 } 16 }
17 17
18 ASTConsumer* FindBadConstructsAction::CreateASTConsumer( 18 std::unique_ptr<ASTConsumer> FindBadConstructsAction::CreateASTConsumer(
19 CompilerInstance& instance, 19 CompilerInstance& instance,
20 llvm::StringRef ref) { 20 llvm::StringRef ref) {
21 return new FindBadConstructsConsumer(instance, options_); 21 return llvm::make_unique<FindBadConstructsConsumer>(instance, options_);
22 } 22 }
23 23
24 bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance, 24 bool FindBadConstructsAction::ParseArgs(const CompilerInstance& instance,
25 const std::vector<std::string>& args) { 25 const std::vector<std::string>& args) {
26 bool parsed = true; 26 bool parsed = true;
27 27
28 for (size_t i = 0; i < args.size() && parsed; ++i) { 28 for (size_t i = 0; i < args.size() && parsed; ++i) {
29 if (args[i] == "skip-virtuals-in-implementations") { 29 if (args[i] == "skip-virtuals-in-implementations") {
30 // TODO(rsleevi): Remove this once http://crbug.com/115047 is fixed. 30 // TODO(rsleevi): Remove this once http://crbug.com/115047 is fixed.
31 options_.check_virtuals_in_implementations = false; 31 options_.check_virtuals_in_implementations = false;
(...skipping 14 matching lines...) Expand all
46 } 46 }
47 47
48 return parsed; 48 return parsed;
49 } 49 }
50 50
51 } // namespace chrome_checker 51 } // namespace chrome_checker
52 52
53 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X( 53 static FrontendPluginRegistry::Add<chrome_checker::FindBadConstructsAction> X(
54 "find-bad-constructs", 54 "find-bad-constructs",
55 "Finds bad C++ constructs"); 55 "Finds bad C++ constructs");
OLDNEW
« no previous file with comments | « tools/clang/plugins/FindBadConstructsAction.h ('k') | tools/clang/plugins/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698