| Index: tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| diff --git a/tools/clang/blink_gc_plugin/RecordInfo.cpp b/tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| index 1d26fa797f3eda7f6249240e3f7b3bcafc79a859..7378077e5da6af34b2036f32d8ae6b3908e0669c 100644
|
| --- a/tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| +++ b/tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| @@ -230,6 +230,16 @@ bool RecordInfo::IsOnlyPlacementNewable() {
|
| return is_only_placement_newable_;
|
| }
|
|
|
| +CXXMethodDecl* RecordInfo::DeclaresNewOperator() {
|
| + for (CXXRecordDecl::method_iterator it = record_->method_begin();
|
| + it != record_->method_end();
|
| + ++it) {
|
| + if (it->getNameAsString() == kNewOperatorName && it->getNumParams() == 1)
|
| + return *it;
|
| + }
|
| + return 0;
|
| +}
|
| +
|
| // An object requires a tracing method if it has any fields that need tracing.
|
| bool RecordInfo::RequiresTraceMethod() {
|
| if (IsStackAllocated())
|
|
|