chromium/tools/clang/blink_gc_plugin/tests/forbidden_fields.txt

In file included from forbidden_fields.cpp:5:
./forbidden_fields.h:26:1: warning: [blink-gc] Class 'HeapObject' contains invalid fields.
class HeapObject : public GarbageCollected<HeapObject> {
^
./forbidden_fields.h:28:3: note: [blink-gc] From part object field 'obj_' here:
  FirstLevelPartObject obj_;
  ^
./forbidden_fields.h:22:3: note: [blink-gc] From part object field 'obj_' here:
  SecondLevelPartObject obj_;
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:28:3: note: [blink-gc] From part object field 'obj_' here:
  FirstLevelPartObject obj_;
  ^
./forbidden_fields.h:23:3: note: [blink-gc] From part object field 'map_of_embedded' here:
  std::map<int, SecondLevelPartObject> map_of_embedded;
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:31:1: warning: [blink-gc] Class 'AnotherHeapObject' contains invalid fields.
class AnotherHeapObject : public GarbageCollected<AnotherHeapObject> {
^
./forbidden_fields.h:33:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<AnotherHeapObject> timer_;
  ^
./forbidden_fields.h:34:3: note: [blink-gc] TaskRunnerTimer field 'vec_of_timers_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  Vector<TaskRunnerTimer<AnotherHeapObject>> vec_of_timers_;
  ^
./forbidden_fields.h:35:3: note: [blink-gc] From part object field 'vec_of_embedded_of_timers' here:
  Vector<SecondLevelPartObject> vec_of_embedded_of_timers;
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:36:3: note: [blink-gc] TaskRunnerTimer field 'array_of_bad_typ_e' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<AnotherHeapObject> array_of_bad_typ_e[2];
  ^
./forbidden_fields.h:37:3: note: [blink-gc] From part object field 'array_of_embedded_object_' here:
  SecondLevelPartObject array_of_embedded_object_[2];
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:38:3: note: [blink-gc] TaskRunnerTimer field 'std_vec_of_timers_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  std::vector<TaskRunnerTimer<AnotherHeapObject>> std_vec_of_timers_;
  ^
./forbidden_fields.h:39:3: note: [blink-gc] TaskRunnerTimer field 'optional_timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  std::optional<TaskRunnerTimer<AnotherHeapObject>> optional_timer_;
  ^
./forbidden_fields.h:40:3: note: [blink-gc] TaskRunnerTimer field 'optional_timer2_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  std::optional<TaskRunnerTimer<AnotherHeapObject>> optional_timer2_;
  ^
./forbidden_fields.h:41:3: note: [blink-gc] From part object field 'optional_embedded_object_' here:
  std::optional<SecondLevelPartObject> optional_embedded_object_;
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:42:3: note: [blink-gc] From part object field 'optional_embedded_object2_' here:
  std::optional<SecondLevelPartObject> optional_embedded_object2_;
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:43:3: note: [blink-gc] From part object field 'variant_embedded_object_' here:
  absl::variant<SecondLevelPartObject> variant_embedded_object_;
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:44:3: note: [blink-gc] From part object field 'variant_embedded_object2_' here:
  std::variant<SecondLevelPartObject> variant_embedded_object2_;
  ^
./forbidden_fields.h:17:3: note: [blink-gc] TaskRunnerTimer field 'timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<SecondLevelPartObject> timer_;
  ^
./forbidden_fields.h:45:3: note: [blink-gc] TaskRunnerTimer field 'unique_ptr_timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  std::unique_ptr<TaskRunnerTimer<AnotherHeapObject>> unique_ptr_timer_;
  ^
./forbidden_fields.h:46:3: note: [blink-gc] TaskRunnerTimer field 'raw_ptr_timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  TaskRunnerTimer<AnotherHeapObject>* raw_ptr_timer_;
  ^
./forbidden_fields.h:47:3: note: [blink-gc] TaskRunnerTimer field 'scoped_refptr_timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  scoped_refptr<TaskRunnerTimer<AnotherHeapObject>> scoped_refptr_timer_;
  ^
./forbidden_fields.h:48:3: note: [blink-gc] TaskRunnerTimer field 'weak_ptr_timer_' used within a garbage collected context. Consider using HeapTaskRunnerTimer instead.
  base::WeakPtr<TaskRunnerTimer<AnotherHeapObject>> weak_ptr_timer_;
  ^
2 warnings generated.