1 // RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -std=c++23 -fsyntax-only %s -verify
2 // RUN: %clang_cc1 -triple x86_64-unknown-windows-itanium -std=c++23 -fsyntax-only %s -verify
9 virtual void operator()();
13 static void operator()();
20 struct W
: virtual V
{
32 auto pmf
= &S::operator();
34 __asm__
__volatile__ ("" : : "r"(&decltype(L
)::operator()));
35 // expected-error@-1{{cannot pass a pointer-to-member through register-constrained inline assembly parameter}}
36 __asm__
__volatile__ ("" : : "r"(&S::operator()));
37 // expected-error@-1{{cannot pass a pointer-to-member through register-constrained inline assembly parameter}}
38 __asm__
__volatile__ ("" : : "r"(&T::operator()));
39 // expected-error@-1{{cannot pass a pointer-to-member through register-constrained inline assembly parameter}}
40 __asm__
__volatile__ ("" : : "r"(pmf
));
41 // expected-error@-1{{cannot pass a pointer-to-member through register-constrained inline assembly parameter}}
42 __asm__
__volatile__ ("" : : "r"(&W::f
));
43 // expected-error@-1{{cannot pass a pointer-to-member through register-constrained inline assembly parameter}}
44 __asm__
__volatile__ ("" : : "r"(&W::i
));
45 // expected-error@-1{{cannot pass a pointer-to-member through register-constrained inline assembly parameter}}
47 __asm__
__volatile__ ("" : : "r"(X
{0,0}));
48 __asm__
__volatile__ ("" : : "r"(&U::operator()));