1// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
2
3// CHECK: int x __attribute__((aligned(4)));
4int x __attribute__((aligned(4)));
5
6// FIXME: Print this at a valid location for a __declspec attr.
7// CHECK: int y __declspec(align(4));
8__declspec(align(4)) int y;
9
10// CHECK: void foo() __attribute__((const));
11void foo() __attribute__((const));
12
13// CHECK: void bar() __attribute__((__const));
14void bar() __attribute__((__const));
15
16// FIXME: Print this with correct format and order.
17// CHECK: void foo1() __attribute__((pure)) __attribute__((noinline));
18void foo1() __attribute__((noinline, pure));
19
20// CHECK: typedef int Small1 __attribute__((mode(byte)));
21typedef int Small1 __attribute__((mode(byte)));
22
23// CHECK: int small __attribute__((mode(byte)));
24int small __attribute__((mode(byte)));
25
26// CHECK: int v __attribute__((visibility("hidden")));
27int v __attribute__((visibility("hidden")));
28
29// CHECK: char *PR24565() __attribute__((malloc))
30char *PR24565() __attribute__((__malloc__));
31
32// CHECK: class __attribute__((consumable("unknown"))) AttrTester1
33class __attribute__((consumable(unknown))) AttrTester1 {
34  // CHECK: void callableWhen() __attribute__((callable_when("unconsumed", "consumed")));
35  void callableWhen()  __attribute__((callable_when("unconsumed", "consumed")));
36};
37