blob: b3bdfd72e6457f2475fe07720051beec4c66a4d9 [file] [log] [blame]
Richard Smith0cdcc982013-01-29 01:24:26 +00001// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
Michael Han99315932013-01-24 16:46:58 +00002
Michael Hanaf02bbe2013-02-01 01:19:17 +00003// CHECK: int x __attribute__((aligned(4)));
Michael Han99315932013-01-24 16:46:58 +00004int x __attribute__((aligned(4)));
5
Richard Smith0cdcc982013-01-29 01:24:26 +00006// FIXME: Print this at a valid location for a __declspec attr.
Michael Hanaf02bbe2013-02-01 01:19:17 +00007// CHECK: int y __declspec(align(4));
Richard Smith0cdcc982013-01-29 01:24:26 +00008__declspec(align(4)) int y;
Michael Han99315932013-01-24 16:46:58 +00009
10// CHECK: void foo() __attribute__((const));
11void foo() __attribute__((const));
12
13// CHECK: void bar() __attribute__((__const));
14void bar() __attribute__((__const));
Richard Smith210b67d2013-01-29 02:31:57 +000015
Aaron Ballman317a77f2013-05-22 23:25:32 +000016// CHECK: int * __ptr32 p32;
Richard Smith210b67d2013-01-29 02:31:57 +000017int * __ptr32 p32;
18
Aaron Ballman317a77f2013-05-22 23:25:32 +000019// CHECK: int * __ptr64 p64;
Richard Smith210b67d2013-01-29 02:31:57 +000020int * __ptr64 p64;
Aaron Ballman317a77f2013-05-22 23:25:32 +000021
22// TODO: the Type Printer has no way to specify the order to print attributes
23// in, and so it currently always prints them in reverse order. Fix this.
24// CHECK: int * __ptr32 __uptr p32_2;
25int * __uptr __ptr32 p32_2;
26
27// CHECK: int * __ptr64 __sptr p64_2;
28int * __sptr __ptr64 p64_2;
29
30// CHECK: int * __ptr32 __uptr p32_3;
31int * __uptr __ptr32 p32_3;
32
33// CHECK: int * __sptr * __ptr32 ppsp32;
34int * __sptr * __ptr32 ppsp32;