[clang] [Sema] Fix parameter index checks on explicit object member functions (PR #165586)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 29 21:59:18 PDT 2025
================
@@ -1,11 +1,16 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only
+// RUN: %clang_cc1 %s -std=c++23 -verify -fsyntax-only
// expected-no-diagnostics
class C_in_class {
#include "../Sema/attr-callback.c"
};
+class ExplicitParameterObject {
+ __attribute__((callback(2, 1))) void explicit_this_idx(this ExplicitParameterObject* self, void (*callback)(ExplicitParameterObject*));
+ __attribute__((callback(2, self))) void explicit_this_identifier(this ExplicitParameterObject* self, void (*callback)(ExplicitParameterObject*));
----------------
Sirraide wrote:
Can you add some codegen tests as well to make sure that we actually generate the right callback metadata for explicit object parameters?
https://github.com/llvm/llvm-project/pull/165586
More information about the cfe-commits
mailing list