annotate clang/test/SemaCXX/declspec-allocator.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fms-compatibility -triple x86_64-windows-msvc -std=c++14 -fms-extensions -fms-compatibility-version=19.00 -verify %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 __declspec(allocator) int err_on_data; // expected-warning {{'allocator' attribute only applies to functions}}
anatofuz
parents:
diff changeset
4 __declspec(allocator) struct ErrOnStruct1; // expected-warning {{place it after "struct" to apply attribute}}
anatofuz
parents:
diff changeset
5 struct __declspec(allocator) ErrOnStruct2 {}; // expected-warning {{'allocator' attribute only applies to functions}}
anatofuz
parents:
diff changeset
6 __declspec(allocator) void err_on_ret_void(); // expected-warning {{not a pointer or reference type}}
anatofuz
parents:
diff changeset
7 __declspec(allocator) int err_on_ret_int(); // expected-warning {{not a pointer or reference type}}
anatofuz
parents:
diff changeset
8 __declspec(allocator) void *accept_on_ptr1();
anatofuz
parents:
diff changeset
9 __declspec(allocator) void *accept_on_ptr2(size_t);
anatofuz
parents:
diff changeset
10 void * __declspec(allocator) accept_on_ptr3(size_t); // expected-error {{expected unqualified-id}}
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 struct Foo { int x; };
anatofuz
parents:
diff changeset
13 __declspec(allocator) Foo *accept_nonvoid_ptr(size_t);