Clang Project

clang_source_code/test/Sema/attr-print.c
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: short arr[3] __attribute__((aligned));
11short arr[3] __attribute__((aligned));
12
13// CHECK: void foo() __attribute__((const));
14void foo() __attribute__((const));
15
16// CHECK: void bar() __attribute__((__const));
17void bar() __attribute__((__const));
18
19// CHECK: int * __ptr32 p32;
20int * __ptr32 p32;
21
22// CHECK: int * __ptr64 p64;
23int * __ptr64 p64;
24
25// CHECK: int * __uptr __ptr32 p32_2;
26int * __uptr __ptr32 p32_2;
27
28// CHECK: int * __sptr __ptr64 p64_2;
29int * __sptr __ptr64 p64_2;
30
31// CHECK: int * __uptr __ptr32 p32_3;
32int * __uptr __ptr32 p32_3;
33
34// CHECK: int * __sptr * __ptr32 ppsp32;
35int * __sptr * __ptr32 ppsp32;
36
37// CHECK: __attribute__((availability(macos, strict, introduced=10.6)));
38void f6(int) __attribute__((availability(macosx,strict,introduced=10.6)));
39