1f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -ast-print | FileCheck %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc typedef void func_typedef(); 4f4a2713aSLionel Sambuc func_typedef xxx; 5f4a2713aSLionel Sambuc 6f4a2713aSLionel Sambuc typedef void func_t(int x); 7f4a2713aSLionel Sambuc func_t a; 8f4a2713aSLionel Sambuc 9f4a2713aSLionel Sambuc struct blah { 10f4a2713aSLionel Sambuc struct { 11f4a2713aSLionel Sambuc struct { 12f4a2713aSLionel Sambuc int b; 13f4a2713aSLionel Sambuc }; 14f4a2713aSLionel Sambuc }; 15f4a2713aSLionel Sambuc }; 16f4a2713aSLionel Sambuc foo(const struct blah * b)17f4a2713aSLionel Sambucint foo(const struct blah *b) { 18f4a2713aSLionel Sambuc // CHECK: return b->b; 19f4a2713aSLionel Sambuc return b->b; 20f4a2713aSLionel Sambuc } 21*0a6a1f1dSLionel Sambuc arr(int a[static3])22*0a6a1f1dSLionel Sambucint arr(int a[static 3]) { 23*0a6a1f1dSLionel Sambuc // CHECK: int a[static 3] 24*0a6a1f1dSLionel Sambuc return a[2]; 25*0a6a1f1dSLionel Sambuc } 26*0a6a1f1dSLionel Sambuc rarr(int a[restrict static3])27*0a6a1f1dSLionel Sambucint rarr(int a[restrict static 3]) { 28*0a6a1f1dSLionel Sambuc // CHECK: int a[restrict static 3] 29*0a6a1f1dSLionel Sambuc return a[2]; 30*0a6a1f1dSLionel Sambuc } 31*0a6a1f1dSLionel Sambuc varr(int n,int a[static n])32*0a6a1f1dSLionel Sambucint varr(int n, int a[static n]) { 33*0a6a1f1dSLionel Sambuc // CHECK: int a[static n] 34*0a6a1f1dSLionel Sambuc return a[2]; 35*0a6a1f1dSLionel Sambuc } 36*0a6a1f1dSLionel Sambuc rvarr(int n,int a[restrict static n])37*0a6a1f1dSLionel Sambucint rvarr(int n, int a[restrict static n]) { 38*0a6a1f1dSLionel Sambuc // CHECK: int a[restrict static n] 39*0a6a1f1dSLionel Sambuc return a[2]; 40*0a6a1f1dSLionel Sambuc } 41*0a6a1f1dSLionel Sambuc 42*0a6a1f1dSLionel Sambuc typedef struct { 43*0a6a1f1dSLionel Sambuc int f; 44*0a6a1f1dSLionel Sambuc } T __attribute__ ((__aligned__)); 45*0a6a1f1dSLionel Sambuc 46*0a6a1f1dSLionel Sambuc // CHECK: struct __attribute__((visibility("default"))) S; 47*0a6a1f1dSLionel Sambuc struct __attribute__((visibility("default"))) S; 48