blob: 45fe2ac294725db0e2761b5070dda069fb0f8b55 [file] [log] [blame]
Stephen Hines0e2c34f2015-03-23 12:09:02 -07001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3int &f();
4
5struct A {
6 void f();
7};
8
9typedef int I;
10
11void 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}