Richard Smith | 0cdcc98 | 2013-01-29 01:24:26 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s |
Michael Han | 9931593 | 2013-01-24 16:46:58 +0000 | [diff] [blame] | 2 | |
Michael Han | af02bbe | 2013-02-01 01:19:17 +0000 | [diff] [blame] | 3 | // CHECK: int x __attribute__((aligned(4))); |
Michael Han | 9931593 | 2013-01-24 16:46:58 +0000 | [diff] [blame] | 4 | int x __attribute__((aligned(4))); |
| 5 | |
Richard Smith | 0cdcc98 | 2013-01-29 01:24:26 +0000 | [diff] [blame] | 6 | // FIXME: Print this at a valid location for a __declspec attr. |
Michael Han | af02bbe | 2013-02-01 01:19:17 +0000 | [diff] [blame] | 7 | // CHECK: int y __declspec(align(4)); |
Richard Smith | 0cdcc98 | 2013-01-29 01:24:26 +0000 | [diff] [blame] | 8 | __declspec(align(4)) int y; |
Michael Han | 9931593 | 2013-01-24 16:46:58 +0000 | [diff] [blame] | 9 | |
Aaron Ballman | 48a533d | 2018-02-27 23:49:28 +0000 | [diff] [blame] | 10 | // CHECK: short arr[3] __attribute__((aligned)); |
| 11 | short arr[3] __attribute__((aligned)); |
| 12 | |
Michael Han | 9931593 | 2013-01-24 16:46:58 +0000 | [diff] [blame] | 13 | // CHECK: void foo() __attribute__((const)); |
| 14 | void foo() __attribute__((const)); |
| 15 | |
| 16 | // CHECK: void bar() __attribute__((__const)); |
| 17 | void bar() __attribute__((__const)); |
Richard Smith | 210b67d | 2013-01-29 02:31:57 +0000 | [diff] [blame] | 18 | |
Aaron Ballman | 317a77f | 2013-05-22 23:25:32 +0000 | [diff] [blame] | 19 | // CHECK: int * __ptr32 p32; |
Richard Smith | 210b67d | 2013-01-29 02:31:57 +0000 | [diff] [blame] | 20 | int * __ptr32 p32; |
| 21 | |
Aaron Ballman | 317a77f | 2013-05-22 23:25:32 +0000 | [diff] [blame] | 22 | // CHECK: int * __ptr64 p64; |
Richard Smith | 210b67d | 2013-01-29 02:31:57 +0000 | [diff] [blame] | 23 | int * __ptr64 p64; |
Aaron Ballman | 317a77f | 2013-05-22 23:25:32 +0000 | [diff] [blame] | 24 | |
Michael Kruse | dc5ce72 | 2018-08-03 01:21:16 +0000 | [diff] [blame] | 25 | // CHECK: int * __uptr __ptr32 p32_2; |
Aaron Ballman | 317a77f | 2013-05-22 23:25:32 +0000 | [diff] [blame] | 26 | int * __uptr __ptr32 p32_2; |
| 27 | |
Michael Kruse | dc5ce72 | 2018-08-03 01:21:16 +0000 | [diff] [blame] | 28 | // CHECK: int * __sptr __ptr64 p64_2; |
Aaron Ballman | 317a77f | 2013-05-22 23:25:32 +0000 | [diff] [blame] | 29 | int * __sptr __ptr64 p64_2; |
| 30 | |
Michael Kruse | dc5ce72 | 2018-08-03 01:21:16 +0000 | [diff] [blame] | 31 | // CHECK: int * __uptr __ptr32 p32_3; |
Aaron Ballman | 317a77f | 2013-05-22 23:25:32 +0000 | [diff] [blame] | 32 | int * __uptr __ptr32 p32_3; |
| 33 | |
| 34 | // CHECK: int * __sptr * __ptr32 ppsp32; |
| 35 | int * __sptr * __ptr32 ppsp32; |
Manman Ren | 42e09eb | 2016-03-10 23:54:12 +0000 | [diff] [blame] | 36 | |
Manman Ren | ccf25bb | 2016-06-28 20:55:30 +0000 | [diff] [blame] | 37 | // CHECK: __attribute__((availability(macos, strict, introduced=10.6))); |
Manman Ren | 42e09eb | 2016-03-10 23:54:12 +0000 | [diff] [blame] | 38 | void f6(int) __attribute__((availability(macosx,strict,introduced=10.6))); |