2012-11-13 03:12:12 +08:00
|
|
|
// RUN: %clang_cc1 %s -ast-print | FileCheck %s
|
2007-12-04 05:43:25 +08:00
|
|
|
|
|
|
|
typedef void func_typedef();
|
|
|
|
func_typedef xxx;
|
|
|
|
|
2007-12-07 01:20:20 +08:00
|
|
|
typedef void func_t(int x);
|
|
|
|
func_t a;
|
2007-12-04 05:43:25 +08:00
|
|
|
|
2012-11-13 03:12:12 +08:00
|
|
|
struct blah {
|
|
|
|
struct {
|
|
|
|
struct {
|
|
|
|
int b;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
int foo(const struct blah *b) {
|
|
|
|
// CHECK: return b->b;
|
|
|
|
return b->b;
|
|
|
|
}
|
2014-07-19 07:19:20 +08:00
|
|
|
|
|
|
|
int arr(int a[static 3]) {
|
|
|
|
// CHECK: int a[static 3]
|
|
|
|
return a[2];
|
|
|
|
}
|
|
|
|
|
2014-07-19 10:01:03 +08:00
|
|
|
int rarr(int a[restrict static 3]) {
|
|
|
|
// CHECK: int a[restrict static 3]
|
|
|
|
return a[2];
|
|
|
|
}
|
|
|
|
|
2014-07-19 07:19:20 +08:00
|
|
|
int varr(int n, int a[static n]) {
|
|
|
|
// CHECK: int a[static n]
|
|
|
|
return a[2];
|
|
|
|
}
|
|
|
|
|
2014-07-19 10:01:03 +08:00
|
|
|
int rvarr(int n, int a[restrict static n]) {
|
|
|
|
// CHECK: int a[restrict static n]
|
|
|
|
return a[2];
|
|
|
|
}
|
|
|
|
|