David Blaikie | 8fab8e5 | 2012-11-12 19:12:12 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -ast-print | FileCheck %s |
Chris Lattner | e5a91b4 | 2007-12-03 21:43:25 +0000 | [diff] [blame] | 2 | |
| 3 | typedef void func_typedef(); |
| 4 | func_typedef xxx; |
| 5 | |
Chris Lattner | b36a98e | 2007-12-06 17:20:20 +0000 | [diff] [blame] | 6 | typedef void func_t(int x); |
| 7 | func_t a; |
Chris Lattner | e5a91b4 | 2007-12-03 21:43:25 +0000 | [diff] [blame] | 8 | |
David Blaikie | 8fab8e5 | 2012-11-12 19:12:12 +0000 | [diff] [blame] | 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 | } |
Hal Finkel | f3e0265 | 2014-07-18 23:19:20 +0000 | [diff] [blame] | 21 | |
| 22 | int arr(int a[static 3]) { |
| 23 | // CHECK: int a[static 3] |
| 24 | return a[2]; |
| 25 | } |
| 26 | |
Hal Finkel | bfe2d3c | 2014-07-19 02:01:03 +0000 | [diff] [blame^] | 27 | int rarr(int a[restrict static 3]) { |
| 28 | // CHECK: int a[restrict static 3] |
| 29 | return a[2]; |
| 30 | } |
| 31 | |
Hal Finkel | f3e0265 | 2014-07-18 23:19:20 +0000 | [diff] [blame] | 32 | int varr(int n, int a[static n]) { |
| 33 | // CHECK: int a[static n] |
| 34 | return a[2]; |
| 35 | } |
| 36 | |
Hal Finkel | bfe2d3c | 2014-07-19 02:01:03 +0000 | [diff] [blame^] | 37 | int rvarr(int n, int a[restrict static n]) { |
| 38 | // CHECK: int a[restrict static n] |
| 39 | return a[2]; |
| 40 | } |
| 41 | |