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

Side by Side Diff: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp

Issue 1901643003: Always enable warn-raw-ptr's check of raw heap pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sof-gc-plugin-upd
Patch Set: remove unused warning diagnostic Created 4 years, 8 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 | « no previous file | tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This clang plugin checks various invariants of the Blink garbage 5 // This clang plugin checks various invariants of the Blink garbage
6 // collection infrastructure. 6 // collection infrastructure.
7 // 7 //
8 // Errors are described at: 8 // Errors are described at:
9 // http://www.chromium.org/developers/blink-gc-plugin-errors 9 // http://www.chromium.org/developers/blink-gc-plugin-errors
10 10
(...skipping 21 matching lines...) Expand all
32 virtual bool ParseArgs(const CompilerInstance& instance, 32 virtual bool ParseArgs(const CompilerInstance& instance,
33 const std::vector<std::string>& args) { 33 const std::vector<std::string>& args) {
34 bool parsed = true; 34 bool parsed = true;
35 35
36 for (size_t i = 0; i < args.size() && parsed; ++i) { 36 for (size_t i = 0; i < args.size() && parsed; ++i) {
37 // TODO(sof): remove this case once a version of the GC plugin 37 // TODO(sof): remove this case once a version of the GC plugin
38 // has rolled which has enable-oilpan-always baked in _and_ 38 // has rolled which has enable-oilpan-always baked in _and_
39 // Blink no longer passes in the option (cf. Source/config.gyp) 39 // Blink no longer passes in the option (cf. Source/config.gyp)
40 if (args[i] == "enable-oilpan") 40 if (args[i] == "enable-oilpan")
41 continue; 41 continue;
42 // TODO(sof): same for warn-raw-ptr
43 if (args[i] == "warn-raw-ptr")
44 continue;
42 if (args[i] == "dump-graph") { 45 if (args[i] == "dump-graph") {
43 options_.dump_graph = true; 46 options_.dump_graph = true;
44 } else if (args[i] == "warn-raw-ptr") {
45 options_.warn_raw_ptr = true;
46 } else if (args[i] == "warn-unneeded-finalizer") { 47 } else if (args[i] == "warn-unneeded-finalizer") {
47 options_.warn_unneeded_finalizer = true; 48 options_.warn_unneeded_finalizer = true;
48 } else { 49 } else {
49 parsed = false; 50 parsed = false;
50 llvm::errs() << "Unknown blink-gc-plugin argument: " << args[i] << "\n"; 51 llvm::errs() << "Unknown blink-gc-plugin argument: " << args[i] << "\n";
51 } 52 }
52 } 53 }
53 54
54 return parsed; 55 return parsed;
55 } 56 }
56 57
57 private: 58 private:
58 BlinkGCPluginOptions options_; 59 BlinkGCPluginOptions options_;
59 }; 60 };
60 61
61 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X( 62 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X(
62 "blink-gc-plugin", 63 "blink-gc-plugin",
63 "Check Blink GC invariants"); 64 "Check Blink GC invariants");
OLDNEW
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698