[mlir] Fix typo in test vector transform pass descriptions (#118194)
[llvm-project.git] / clang / test / SemaCXX / attr-callback.cpp
blobee02f7d3d24f7961085aa7ecd8d5da57a2b10b92
1 // RUN: %clang_cc1 %s -verify -fsyntax-only
3 // expected-no-diagnostics
5 class C_in_class {
6 #include "../Sema/attr-callback.c"
7 };
9 struct Base {
11 void no_args_1(void (*callback)(void));
12 __attribute__((callback(1))) void no_args_2(void (*callback)(void));
13 __attribute__((callback(callback))) void no_args_3(void (*callback)(void)) {}
15 __attribute__((callback(1, 0))) virtual void
16 this_tr(void (*callback)(Base *));
18 __attribute__((callback(1, this, __, this))) virtual void
19 this_unknown_this(void (*callback)(Base *, Base *, Base *));
21 __attribute__((callback(1))) virtual void
22 virtual_1(void (*callback)(void));
24 __attribute__((callback(callback))) virtual void
25 virtual_2(void (*callback)(void));
27 __attribute__((callback(1))) virtual void
28 virtual_3(void (*callback)(void));
31 __attribute__((callback(1))) void
32 Base::no_args_1(void (*callback)(void)) {
35 void Base::no_args_2(void (*callback)(void)) {
38 struct Derived_1 : public Base {
40 __attribute__((callback(1, 0))) virtual void
41 this_tr(void (*callback)(Base *)) override;
43 __attribute__((callback(1))) virtual void
44 virtual_1(void (*callback)(void)) override {}
46 virtual void
47 virtual_3(void (*callback)(void)) override {}
50 struct Derived_2 : public Base {
52 __attribute__((callback(callback))) virtual void
53 virtual_1(void (*callback)(void)) override;
55 virtual void
56 virtual_2(void (*callback)(void)) override;
58 virtual void
59 virtual_3(void (*callback)(void)) override;
62 void Derived_2::virtual_1(void (*callback)(void)) {}
64 __attribute__((callback(1))) void
65 Derived_2::virtual_2(void (*callback)(void)) {}
67 void Derived_2::virtual_3(void (*callback)(void)) {}