| OLD | NEW |
| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 if (prefix.size() > str.size()) | 257 if (prefix.size() > str.size()) |
| 258 return false; | 258 return false; |
| 259 return str.compare(0, prefix.size(), prefix) == 0; | 259 return str.compare(0, prefix.size(), prefix) == 0; |
| 260 } | 260 } |
| 261 | 261 |
| 262 static bool EndsWith(const std::string& str, const std::string& suffix) { | 262 static bool EndsWith(const std::string& str, const std::string& suffix) { |
| 263 if (suffix.size() > str.size()) | 263 if (suffix.size() > str.size()) |
| 264 return false; | 264 return false; |
| 265 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; | 265 return str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; |
| 266 } | 266 } |
| 267 |
| 268 // Test if a template specialization is an instantiation. |
| 269 static bool IsTemplateInstantiation(clang::CXXRecordDecl* record); |
| 267 }; | 270 }; |
| 268 | 271 |
| 269 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ | 272 #endif // TOOLS_BLINK_GC_PLUGIN_CONFIG_H_ |
| OLD | NEW |