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

optional_gc_object.cpp:14:3: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
  absl::optional<Base> optional_field_;  // Optional fields are disallowed.
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:15:3: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
  std::optional<Base> optional_field2_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:16:3: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
  absl::optional<Traceable>
  ^~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:18:3: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
  std::optional<Traceable> optional_field4_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:19:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ptr<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ptr<Base> raw_ptr_field_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:20:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ptr<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ptr<Traceable> raw_ptr_field2_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:21:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ref<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ref<Base> raw_ref_field_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:22:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ref<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ref<Traceable> raw_ref_field2_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:36:5: warning: [blink-gc] Disallowed new-expression of 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields cannot hold garbage-collected or traceable objects.
    new absl::optional<Base>;  // New expression with gced optionals are not
    ^~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:39:5: warning: [blink-gc] Disallowed new-expression of 'optional<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Optional fields cannot hold garbage-collected or traceable objects.
    new absl::optional<Traceable>;  // New expression with traceable optionals
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:27:5: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
    absl::optional<Base> optional_base;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:30:5: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Derived>' found; 'Derived' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
    absl::optional<Derived> optional_derived;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:53:5: warning: [blink-gc] Disallowed new-expression of 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields cannot hold garbage-collected or traceable objects.
    new std::optional<Base>;  // New expression with gced optionals are not
    ^~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:56:5: warning: [blink-gc] Disallowed new-expression of 'optional<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Optional fields cannot hold garbage-collected or traceable objects.
    new std::optional<Traceable>;  // New expression with traceable optionals
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:44:5: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
    std::optional<Base> optional_base;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:47:5: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Derived>' found; 'Derived' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
    std::optional<Derived> optional_derived;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:70:5: warning: [blink-gc] Disallowed new-expression of 'raw_ptr<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref fields cannot hold garbage-collected or traceable objects.
    new base::raw_ptr<Base>;  // New expression with gced raw_ptrs are not
    ^~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:73:5: warning: [blink-gc] Disallowed new-expression of 'raw_ptr<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref fields cannot hold garbage-collected or traceable objects.
    new base::raw_ptr<Traceable>;  // New expression with traceable raw_ptrs
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:61:5: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ptr<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
    base::raw_ptr<Base> raw_ptr_base;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:64:5: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ptr<blink::Derived>' found; 'Derived' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
    base::raw_ptr<Derived> raw_ptr_derived;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:67:5: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ptr<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
    base::raw_ptr<Traceable> raw_ptr_traceable;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:87:5: warning: [blink-gc] Disallowed new-expression of 'raw_ref<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref fields cannot hold garbage-collected or traceable objects.
    new base::raw_ref<Base>;  // New expression with gced raw_refs are not
    ^~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:90:5: warning: [blink-gc] Disallowed new-expression of 'raw_ref<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref fields cannot hold garbage-collected or traceable objects.
    new base::raw_ref<Traceable>;  // New expression with traceable raw_refs
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:78:5: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ref<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
    base::raw_ref<Base> raw_ref_base;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:81:5: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ref<blink::Derived>' found; 'Derived' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
    base::raw_ref<Derived> raw_ref_derived;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:84:5: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ref<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
    base::raw_ref<Traceable> raw_ref_traceable;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:112:3: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
  absl::optional<Base> optional_field_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:113:3: warning: [blink-gc] Disallowed optional field or variable of type 'optional<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Optional fields and variables cannot hold garbage-collected or traceable objects.
  std::optional<Base> optional_field2_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:116:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ptr<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ptr<Base> raw_ptr_field_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:117:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ptr<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ptr<Traceable> raw_ptr_field2_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:118:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ref<blink::Base>' found; 'Base' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ref<Base> raw_ref_field_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
optional_gc_object.cpp:119:3: warning: [blink-gc] Disallowed raw_ptr or raw_ref field or variable of type 'raw_ref<blink::Traceable>' found; 'Traceable' is a garbage-collected or traceable type. Raw_ptr and raw_ref field and variable cannot hold garbage-collected or traceable objects.
  base::raw_ref<Traceable> raw_ref_field2_;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 warnings generated.