[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / cxx-member-pointer-op.cpp
blobf43d438eb46fc72d5233acaf6e800a4dd4c4a70c
1 // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
3 struct C {
4 static int (C::* a);
5 };
7 typedef void (C::*pmfc)();
9 void g(pmfc) {
10 C *c;
11 c->*pmfc(); // expected-error {{invalid use of pointer to member type after ->*}}
12 C c1;
13 c1.*pmfc(); // expected-error {{invalid use of pointer to member type after .*}}
14 c->*(pmfc()); // expected-error {{invalid use of pointer to member type after ->*}}
15 c1.*((pmfc())); // expected-error {{invalid use of pointer to member type after .*}}
18 int a(C* x) {
19 return x->*C::a;