diff options
Diffstat (limited to 'clang/test/SemaCXX/attr-callback-broken.cpp')
| -rw-r--r-- | clang/test/SemaCXX/attr-callback-broken.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/attr-callback-broken.cpp b/clang/test/SemaCXX/attr-callback-broken.cpp index a5469b2..53b331a 100644 --- a/clang/test/SemaCXX/attr-callback-broken.cpp +++ b/clang/test/SemaCXX/attr-callback-broken.cpp @@ -1,7 +1,12 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -std=c++23 -verify -fsyntax-only  class C_in_class {  #define HAS_THIS  #include "../Sema/attr-callback-broken.c"  #undef HAS_THIS  }; + +class ExplicitParameterObject { +  __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'}} +  __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'}} +};  | 
