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

Side by Side Diff: tools/clang/blink_gc_plugin/Config.h

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 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 file defines the names used by GC infrastructure. 5 // This file defines the names used by GC infrastructure.
6 6
7 // TODO: Restructure the name determination to use fully qualified names (ala, 7 // TODO: Restructure the name determination to use fully qualified names (ala,
8 // blink::Foo) so that the plugin can be enabled for all of chromium. Doing so 8 // blink::Foo) so that the plugin can be enabled for all of chromium. Doing so
9 // would allow us to catch errors with structures outside of blink that might 9 // would allow us to catch errors with structures outside of blink that might
10 // have unsafe pointers to GC allocated blink structures. 10 // have unsafe pointers to GC allocated blink structures.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 formal_type.getTypePtr())) { 188 formal_type.getTypePtr())) {
189 if (IsVisitorPtrType(subst_type->getReplacementType())) { 189 if (IsVisitorPtrType(subst_type->getReplacementType())) {
190 // VisitorDispatcher template parameter substituted to Visitor*. 190 // VisitorDispatcher template parameter substituted to Visitor*.
191 return true; 191 return true;
192 } 192 }
193 } else if (const clang::TemplateTypeParmType* parm_type = 193 } else if (const clang::TemplateTypeParmType* parm_type =
194 clang::dyn_cast<clang::TemplateTypeParmType>( 194 clang::dyn_cast<clang::TemplateTypeParmType>(
195 formal_type.getTypePtr())) { 195 formal_type.getTypePtr())) {
196 if (parm_type->getDecl()->getName() == kVisitorDispatcherName) { 196 if (parm_type->getDecl()->getName() == kVisitorDispatcherName) {
197 // Unresolved, but its parameter name is VisitorDispatcher. 197 // Unresolved, but its parameter name is VisitorDispatcher.
198 return true; 198 return false;
199 } 199 }
200 } 200 }
201 201
202 return IsVisitorPtrType(formal_type); 202 return IsVisitorPtrType(formal_type);
203 } 203 }
204 204
205 static bool IsTraceMethod(clang::FunctionDecl* method, 205 static bool IsTraceMethod(clang::FunctionDecl* method,
206 bool* is_trace_after_dispatch) { 206 bool* is_trace_after_dispatch) {
207 if (method->getNumParams() != 1) 207 if (method->getNumParams() != 1)
208 return false; 208 return false;
(...skipping 24 matching lines...) Expand all
233 } 233 }
234 234
235 static bool EndsWith(const std::string& str, const std::string& suffix) { 235 static bool EndsWith(const std::string& str, const std::string& suffix) {
236 if (suffix.size() > str.size()) 236 if (suffix.size() > str.size())
237 return false; 237 return false;
238 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; 238 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
239 } 239 }
240 }; 240 };
241 241
242 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ 242 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp ('k') | tools/clang/blink_gc_plugin/tests/traceimpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698