1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
---|---|
2 | |
3 | int &f(); |
4 | |
5 | struct A { |
6 | void f(); |
7 | }; |
8 | |
9 | typedef int I; |
10 | |
11 | void g() { |
12 | __builtin_call_with_static_chain(f(), f) = 42; |
13 | __builtin_call_with_static_chain(A().f(), f); // expected-error {{first argument to __builtin_call_with_static_chain must be a non-member call expression}} |
14 | __builtin_call_with_static_chain((42).~I(), f); // expected-error {{first argument to __builtin_call_with_static_chain must not be a pseudo-destructor call}} |
15 | } |
16 |