Lines Matching full:auto
5 …auto undefined; // expected-error {{declaration of variable 'undefined' with deduced type 'aut… in test_basic_types()
6 auto auto_int = 4; in test_basic_types()
7 auto auto_long = 4UL; in test_basic_types()
8 auto int auto_int_ts = 12; in test_basic_types()
9 signed auto a = 1L; // expected-error {{'auto' cannot be signed or unsigned}} in test_basic_types()
16 _Complex auto i = 12.0; // expected-error {{'_Complex auto' is invalid}} in test_complex_types()
20 auto t = ({ // expected-warning {{use of GNU statement expression extension}} in test_gnu_extensions()
21 auto b = 12; in test_gnu_extensions()
28 auto auto_size = sizeof(auto); // expected-error {{expected expression}} in test_sizeof_typeof()
29 typeof(auto) tpof = 4; // expected-error {{expected expression}} in test_sizeof_typeof()
33 auto int_cast = (int)(4 + 3); in test_casts()
34 auto double_cast = (double)(1 / 3); in test_casts()
35 auto long_cast = (long)(4UL + 3UL); in test_casts()
36 auto auto_cast = (auto)(4 + 3); // expected-error {{expected expression}} in test_casts()
44 auto int_cl = (int){13}; in test_compound_literral()
45 auto double_cl = (double){2.5}; in test_compound_literral()
46 auto array[] = { 1, 2, 3 }; // expected-error {{cannot use 'auto' with array in C}} in test_compound_literral()
48 auto auto_cl = (auto){13}; // expected-error {{expected expression}} in test_compound_literral()
56 auto a = array; in test_array_pointers()
57 auto b = &array; in test_array_pointers()
66 auto result = (typeof(typeof_target())){12}; in test_typeof()
72 const auto a = 12; in test_qualifiers()
73 auto b = y; in test_qualifiers()
74 static auto c = 1UL; in test_qualifiers()
88 auto str = "this is a string"; in test_strings()
89 …auto str2[] = "this is a string"; // expected-warning {{type inference of a declaration othe… in test_strings()
90 auto (str3) = "this is a string"; in test_strings()
91 auto (((str4))) = "this is a string"; in test_strings()
100 auto a = 12; in test_pointers()
101 …auto *ptr = &a; // expected-warning {{type inference of a declaration othe… in test_pointers()
102 …auto *str = "this is a string"; // expected-warning {{type inference of a declaration othe… in test_pointers()
103 …const auto *str2 = "this is a string"; // expected-warning {{type inference of a declaration othe… in test_pointers()
104 …auto *b = &a; // expected-warning {{type inference of a declaration othe… in test_pointers()
106 auto nptr = nullptr; in test_pointers()
117 …extern void foo(int a, int array[({ auto x = 12; x;})]); // expected-warning {{use of GNU stateme… in test_prototypes()
124 …auto a = a * a; // expected-error {{variable 'a' declared with deduced type 'auto' cannot appear i… in test_scopes()
125 …expected-error {{variable 'a' declared with deduced type 'auto' cannot appear in its own initializ… in test_scopes()
128 auto b = a * a; in test_scopes()
129 auto a = b; in test_scopes()
136 [[clang::overloadable]] auto test(auto x) { // expected-error {{'auto' not allowed in function prot… in test()
137 … expected-error {{'auto' not allowed in function return type}} in test()