Lines Matching full:unconsumed
15 class CONSUMABLE(unconsumed) ConsumableClass {
21 ConsumableClass(T val) RETURN_TYPESTATE(unconsumed);
36 void operator*() const CALLABLE_WHEN("unconsumed");
37 void unconsumedCall() const CALLABLE_WHEN("unconsumed");
38 void callableWhenUnknown() const CALLABLE_WHEN("unconsumed", "unknown");
40 bool isValid() const TEST_TYPESTATE(unconsumed);
41 operator bool() const TEST_TYPESTATE(unconsumed);
42 bool operator!=(nullptr_t) const TEST_TYPESTATE(unconsumed);
49 void unconsume() SET_TYPESTATE(unconsumed);
52 class CONSUMABLE(unconsumed) DestructorTester {
57 void operator*() CALLABLE_WHEN("unconsumed");
72 return ConsumableClass<int>(); // expected-warning {{return value not in expected state; expected 'unconsumed', observed 'consumed'}}
117 D0.~DestructorTester(); // expected-warning {{invalid invocation of method '~DestructorTester' on object 'D0' while it is in the 'unconsumed' state}}
119 return; // expected-warning {{invalid invocation of method '~DestructorTester' on object 'D0' while it is in the 'unconsumed' state}} \
120 expected-warning {{invalid invocation of method '~DestructorTester' on object 'D1' while it is in the 'unconsumed' state}}
406 void testParamReturnTypestateCallee(bool cond, ConsumableClass<int> &Param RETURN_TYPESTATE(unconsumed)) { // expected-warning {{parameter 'Param' not in expected state when the function returns: expected 'unconsumed', observed 'consumed'}}
410 return; // expected-warning {{parameter 'Param' not in expected state when the function returns: expected 'unconsumed', observed 'consumed'}}
434 unconsumed'}}
438 void consumeFunc(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
440 static void consumeFuncStatic(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
441 void consumeFuncMeth(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
442 void operator<<(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
445 void operator>>(ParamTest& pt, ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
452 consumeFunc(P); // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
453 ParamTest::consumeFuncStatic(P); // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
455 pt.consumeFuncMeth(P); // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
456 pt << P; // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
457 pt >> P; // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
692 class CONSUMABLE(unconsumed)
702 Status(int c) RETURN_TYPESTATE(unconsumed);
737 doSomething(); // expected-warning {{invalid invocation of method '~Status' on a temporary object while it is in the 'unconsumed' state}}
750 } // expected-warning {{invalid invocation of method '~Status' on object 's' while it is in the 'unconsumed' state}}
753 bool b = false || doSomething(); // expected-warning {{invalid invocation of method '~Status' on a temporary object while it is in the 'unconsumed' state}}
772 s.clear(); // expected-warning {{invalid invocation of method 'clear' on object 's' while it is in the 'unconsumed' state}}
792 } // expected-warning {{invalid invocation of method '~Status' on object 's' while it is in the 'unconsumed' state}}
800 } // expected-warning {{invalid invocation of method '~Status' on object 's' while it is in the 'unconsumed' state}}
835 } // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
847 } // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
861 } // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
876 } // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
889 s1 = s2; // expected-warning {{invalid invocation of method 'operator=' on object 's1' while it is in the 'unconsumed' state}}
897 return s; // should autocast back to unconsumed