brintos

brintos / llvm-project-archived public Read only

0
0
Text · 675 B · 53b331a Raw
13 lines · cpp
1// RUN: %clang_cc1 %s -std=c++23 -verify -fsyntax-only2 3class C_in_class {4#define HAS_THIS5#include "../Sema/attr-callback-broken.c"6#undef HAS_THIS7};8 9class ExplicitParameterObject {10  __attribute__((callback(2, 0))) void explicit_this_idx(this ExplicitParameterObject* self, void (*callback)(ExplicitParameterObject*));           // expected-error {{'callback' argument at position 2 references unavailable implicit 'this'}}11  __attribute__((callback(2, this))) void explicit_this_identifier(this ExplicitParameterObject* self, void (*callback)(ExplicitParameterObject*)); // expected-error {{'callback' argument at position 2 references unavailable implicit 'this'}}12};13