Lines Matching full:return
4 // Check that we don't get any extra warning for "return" without an
5 // expression, in a function that might have been intended to return
8 return; in h1()
14 auto f2() { return; } in f2()
15 auto f3() { return void(); } in f3()
17 return i; in f4()
18 …return; // expected-error {{'auto' in return type deduced as 'void' here but deduced as 'int' in e… in f4()
21 return i; in f5()
22 …return void(); // expected-error {{'auto' in return type deduced as 'void' here but deduced as 'in… in f5()
26 auto l2 = []() { return; }; in __anon22edc4580202()
27 auto l3 = []() { return void(); }; in __anon22edc4580302()
29 return i; in __anon22edc4580402()
30 …return; // expected-error {{return type 'void' must match previous return type 'int' when lambda e… in __anon22edc4580402()
33 return i; in __anon22edc4580502()
34 …return void(); // expected-error {{return type 'void' must match previous return type 'int' when l… in __anon22edc4580502()
42 decltype(auto) f2() { return; } in f2()
43 decltype(auto) f3() { return void(); } in f3()
45 return i; in f4()
46 …return; // expected-error {{'decltype(auto)' in return type deduced as 'void' here but deduced as … in f4()
49 return i; in f5()
50 …return void(); // expected-error {{'decltype(auto)' in return type deduced as 'void' here but dedu… in f5()
54 auto l2 = []() -> decltype(auto) { return; };
55 auto l3 = []() -> decltype(auto) { return void(); };
57 return i;
58 …return; // expected-error {{'decltype(auto)' in return type deduced as 'void' here but deduced as …
61 return i;
62 …return void(); // expected-error {{'decltype(auto)' in return type deduced as 'void' here but dedu…
69 auto *f1() { } // expected-error {{cannot deduce return type 'auto *' for function with no return s… in f1()
71 return; // expected-error {{cannot deduce return type 'auto *' from omitted return expression}} in f2()
74 …return void(); // expected-error {{cannot deduce return type 'auto *' from returned value of type … in f3()
77 return &i; in f4()
78 return; // expected-error {{cannot deduce return type 'auto *' from omitted return expression}} in f4()
81 return &i; in f5()
82 …return void(); // expected-error {{cannot deduce return type 'auto *' from returned value of type … in f5()
85 …]() -> auto* { }; // expected-error {{cannot deduce return type 'auto *' for function with no retu… in __anon22edc4580602()
87 return; // expected-error {{cannot deduce return type 'auto *' from omitted return expression}} in __anon22edc4580702()
90 …return void(); // expected-error {{cannot deduce return type 'auto *' from returned value of type … in __anon22edc4580802()
93 return &i; in __anon22edc4580902()
94 return; // expected-error {{cannot deduce return type 'auto *' from omitted return expression}} in __anon22edc4580902()
97 return &i; in __anon22edc4580a02()
98 …return void(); // expected-error {{cannot deduce return type 'auto *' from returned value of type … in __anon22edc4580a02()
104 auto& f1() { // expected-error {{cannot deduce return type 'auto &' for function with no return sta… in f1()
107 return; // expected-error {{cannot deduce return type 'auto &' from omitted return expression}} in f2()
110 return void(); // expected-error@-1 {{cannot form a reference to 'void'}} in f3()
113 return i; in f4()
114 return; // expected-error {{cannot deduce return type 'auto &' from omitted return expression}} in f4()
117 return i; in f5()
118 return void(); // expected-error {{deduced as 'int' in earlier return statement}} in f5()
120 auto& f6() { return 42; } // expected-error {{non-const lvalue reference to type 'int' cannot bind … in f6()
122 …]() -> auto& { }; // expected-error {{cannot deduce return type 'auto &' for function with no retu… in __anon22edc4580b02()
124 return; // expected-error {{cannot deduce return type 'auto &' from omitted return expression}} in __anon22edc4580c02()
127 return void(); in __anon22edc4580d02()
130 return i; in __anon22edc4580e02()
131 return; // expected-error {{cannot deduce return type 'auto &' from omitted return expression}} in __anon22edc4580e02()
134 return i; in __anon22edc4580f02()
135 return void(); // expected-error {{deduced as 'int' in earlier return statement}} in __anon22edc4580f02()
138 …return 42; // expected-error {{non-const lvalue reference to type 'int' cannot bind to a temporary… in __anon22edc4581002()