2013-01-29 09:24:26 +08:00
|
|
|
// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
|
2013-01-25 00:46:58 +08:00
|
|
|
|
2013-02-01 09:19:17 +08:00
|
|
|
// CHECK: int x __attribute__((aligned(4)));
|
2013-01-25 00:46:58 +08:00
|
|
|
int x __attribute__((aligned(4)));
|
|
|
|
|
2013-01-29 09:24:26 +08:00
|
|
|
// FIXME: Print this at a valid location for a __declspec attr.
|
2013-02-01 09:19:17 +08:00
|
|
|
// CHECK: int y __declspec(align(4));
|
2013-01-29 09:24:26 +08:00
|
|
|
__declspec(align(4)) int y;
|
2013-01-25 00:46:58 +08:00
|
|
|
|
|
|
|
// CHECK: void foo() __attribute__((const));
|
|
|
|
void foo() __attribute__((const));
|
|
|
|
|
|
|
|
// CHECK: void bar() __attribute__((__const));
|
|
|
|
void bar() __attribute__((__const));
|
2013-01-29 12:13:20 +08:00
|
|
|
|
|
|
|
// FIXME: Print this with correct format and order.
|
|
|
|
// CHECK: void foo1() __attribute__((pure)) __attribute__((noinline));
|
|
|
|
void foo1() __attribute__((noinline, pure));
|
2013-06-20 20:46:19 +08:00
|
|
|
|
|
|
|
// CHECK: typedef int Small1 __attribute__((mode(byte)));
|
|
|
|
typedef int Small1 __attribute__((mode(byte)));
|
|
|
|
|
|
|
|
// CHECK: int small __attribute__((mode(byte)));
|
|
|
|
int small __attribute__((mode(byte)));
|
2014-09-15 23:14:13 +08:00
|
|
|
|
|
|
|
// CHECK: int v __attribute__((visibility("hidden")));
|
|
|
|
int v __attribute__((visibility("hidden")));
|
|
|
|
|
2015-08-26 00:44:38 +08:00
|
|
|
// CHECK: char *PR24565() __attribute__((malloc))
|
|
|
|
char *PR24565() __attribute__((__malloc__));
|
|
|
|
|
2014-09-16 00:45:30 +08:00
|
|
|
// CHECK: class __attribute__((consumable("unknown"))) AttrTester1
|
2014-09-15 23:14:13 +08:00
|
|
|
class __attribute__((consumable(unknown))) AttrTester1 {
|
|
|
|
// CHECK: void callableWhen() __attribute__((callable_when("unconsumed", "consumed")));
|
|
|
|
void callableWhen() __attribute__((callable_when("unconsumed", "consumed")));
|
|
|
|
};
|