[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / encode-typeof-test.m
blobfe8f29c3b97235a8f06110b2b2057d5e9c8af256
1 // RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2 // rdar://16655340
3 @protocol X, Y, Z;
4 @class Foo;
6 @protocol Proto
7 @end
9 @interface Intf <Proto>
11 id <X> IVAR_x;
12 id <X, Y> IVAR_xy;
13 id <X, Y, Z> IVAR_xyz;
14 Foo <X, Y, Z> *IVAR_Fooxyz;
15 Class <X> IVAR_Classx;
17 @end
19 @implementation Intf 
20 @end
22 int main()
24     int i;
25     typeof(@encode(typeof(i))) e = @encode(typeof(Intf)); // expected-warning {{initializer-string for char array is too long}}
28 // rdar://9255564
29 typedef short short8 __attribute__((ext_vector_type(8)));
31 struct foo {
32  char a;
33  int b;
34  long c;
35  short8 d;
36  int array[4];
37  short int bitfield1:5;
38  unsigned short bitfield2:11;
39  char *string;
42 const char *RetEncode () {
43  return @encode(struct foo); // expected-warning {{encoding of 'struct foo' type is incomplete because 'short8' (vector of 8 'short' values) component has unknown encoding}}