Home | History | Annotate | Download | only in Sema
      1 // RUN: %clang_cc1 %s -ast-print | FileCheck %s
      2 
      3 typedef void func_typedef();
      4 func_typedef xxx;
      5 
      6 typedef void func_t(int x);
      7 func_t a;
      8 
      9 struct blah {
     10   struct {
     11     struct {
     12       int b;
     13     };
     14   };
     15 };
     16 
     17 int foo(const struct blah *b) {
     18   // CHECK: return b->b;
     19   return b->b;
     20 }
     21 
     22 int arr(int a[static 3]) {
     23   // CHECK: int a[static 3]
     24   return a[2];
     25 }
     26 
     27 int rarr(int a[restrict static 3]) {
     28   // CHECK: int a[restrict static 3]
     29   return a[2];
     30 }
     31 
     32 int varr(int n, int a[static n]) {
     33   // CHECK: int a[static n]
     34   return a[2];
     35 }
     36 
     37 int rvarr(int n, int a[restrict static n]) {
     38   // CHECK: int a[restrict static n]
     39   return a[2];
     40 }
     41 
     42 typedef struct {
     43   int f;
     44 } T __attribute__ ((__aligned__));
     45 
     46 // CHECK: struct __attribute__((visibility("default"))) S;
     47 struct __attribute__((visibility("default"))) S;
     48 
     49 struct pair_t {
     50   int a;
     51   int b;
     52 };
     53 
     54 // CHECK: struct pair_t p = {a: 3, .b = 4};
     55 struct pair_t p = {a: 3, .b = 4};
     56