Home | History | Annotate | Download | only in SemaCXX
      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 
      9 void g() {
     10   S a( f() );
     11 }
     12 
     13 namespace PR6064 {
     14   struct A {
     15     A() { }
     16     inline A(A&, int); // expected-note {{was not a special member function}}
     17   };
     18 
     19   A::A(A&, int = 0) { } // expected-warning {{makes this constructor a copy constructor}}
     20 
     21   void f() {
     22     A const a;
     23     A b(a);
     24   }
     25 }
     26