1 // RUN: %clang_cc1 -fsyntax-only -Wno-error=address-of-temporary -verify %s 2 struct X { 3 X(); 4 X(int); 5 X(int, int); 6 }; 7 8 void f0() { (void)&X(); } // expected-warning{{taking the address of a temporary object}} 9 void f1() { (void)&X(1); } // expected-warning{{taking the address of a temporary object}} 10 void f2() { (void)&X(1, 2); } // expected-warning{{taking the address of a temporary object}} 11 void f3() { (void)&(X)1; } // expected-warning{{taking the address of a temporary object}} 12 13