• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 struct S {
4    S (S);  // expected-error {{copy constructor must pass its first argument by reference}}
5 };
6 
7 S f();
8 
g()9 void g() {
10   S a( f() );
11 }
12 
13 namespace PR6064 {
14   struct A {
APR6064::A15     A() { }
16     inline A(A&, int); // expected-note {{was not a special member function}}
17   };
18 
A(A &,int=0)19   A::A(A&, int = 0) { } // expected-warning {{makes this constructor a copy constructor}}
20 
f()21   void f() {
22     A const a;
23     A b(a);
24   }
25 }
26