1 // RUN: %clang_cc1 -fsyntax-only -verify %s
13 x
= sizeof(a
->bitX
); // expected-error {{invalid application of 'sizeof' to bit-field}}
14 x
= sizeof((unsigned) a
->bitX
);
15 x
= sizeof(a
->foo(), a
->bitX
); // expected-error {{invalid application of 'sizeof' to bit-field}}
16 x
= sizeof(a
->var
? a
->bitX
: a
->bitY
); // expected-error {{invalid application of 'sizeof' to bit-field}}
17 x
= sizeof(a
->var
? a
->bitX
: a
->bitX
); // expected-error {{invalid application of 'sizeof' to bit-field}}
18 x
= sizeof(a
->bitX
= 3); // expected-error {{invalid application of 'sizeof' to bit-field}}
19 x
= sizeof(a
->bitY
+= 3); // expected-error {{invalid application of 'sizeof' to bit-field}}
24 x
= sizeof(void); // expected-error {{invalid application of 'sizeof' to an incomplete type 'void'}}
25 x
= sizeof(int()); // expected-error {{invalid application of 'sizeof' to a function type}}
26 x
= sizeof(test2()); // expected-error {{invalid application of 'sizeof' to an incomplete type 'void'}}
27 x
= sizeof(test2
); // expected-error {{invalid application of 'sizeof' to a function type}}
32 template<typename T
> struct ABC
{
34 return sizeof T
; // expected-error {{expected parentheses around type name in sizeof expression}}
40 template<typename T
> struct ABC2
{