1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
7 struct X
{ // expected-note{{candidate found by name lookup}}
16 } X
; // expected-note{{candidate found by name lookup}}
23 X
*x
; // expected-error{{reference to 'X' is ambiguous}}
39 struct S
{ S() {} }; // expected-note {{candidate constructor (the implicit copy constructor) not viable}}
40 #if __cplusplus >= 201103L // C++11 or later
41 // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}}
43 int a
= S(); // expected-error {{no viable conversion from 'S'}}
44 struct S c
= b
; // expected-error {{no viable conversion from 'struct S'}}
58 struct S
{ S() {} }; // expected-note {{candidate constructor (the implicit copy constructor) not viable}}
59 #if __cplusplus >= 201103L // C++11 or later
60 // expected-note@-2 {{candidate constructor (the implicit move constructor) not viable}}
62 int a
= S(); // expected-error {{no viable conversion from 'S'}}
63 struct S c
= b
; // expected-error {{no viable conversion from 'struct S'}}