1 // RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
3 // CHECK: int x __attribute__((aligned(4)));
4 int x
__attribute__((aligned(4)));
6 // CHECK: __declspec(align(4)) int y;
7 __declspec(align(4)) int y
;
9 // CHECK: int foo() __attribute__((const));
10 int foo() __attribute__((const));
12 // CHECK: int bar() __attribute__((__const));
13 int bar() __attribute__((__const
));
15 // FIXME: Print this with correct format.
16 // CHECK: int foo1() __attribute__((noinline)) __attribute__((pure));
17 int foo1() __attribute__((noinline
, pure
));
19 // CHECK: typedef int Small1 __attribute__((mode(byte)));
20 typedef int Small1
__attribute__((mode(byte
)));
22 // CHECK: int small __attribute__((mode(byte)));
23 int small
__attribute__((mode(byte
)));
25 // CHECK: int v __attribute__((visibility("hidden")));
26 int v
__attribute__((visibility("hidden")));
28 // CHECK: char *PR24565() __attribute__((malloc))
29 char *PR24565() __attribute__((__malloc__
));
31 // CHECK: class __attribute__((consumable("unknown"))) AttrTester1
32 class __attribute__((consumable(unknown
))) AttrTester1
{
33 // CHECK: void callableWhen() __attribute__((callable_when("unconsumed", "consumed")));
34 void callableWhen() __attribute__((callable_when("unconsumed", "consumed")));
37 // CHECK: class __single_inheritance SingleInheritance;
38 class __single_inheritance SingleInheritance
;
40 // CHECK: class __multiple_inheritance MultipleInheritance;
41 class __multiple_inheritance MultipleInheritance
;
43 // CHECK: class __virtual_inheritance VirtualInheritance;
44 class __virtual_inheritance VirtualInheritance
;
46 // CHECK: typedef double *aligned_double __attribute__((align_value(64)));
47 typedef double * __attribute__((align_value(64))) aligned_double
;