summaryrefslogtreecommitdiff
path: root/test/SemaCXX/copy-constructor-error.cpp
blob: bdf635d02f24d3bd678f1a81951ef958a37b1aa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -fsyntax-only -verify %s 

struct S { // expected-note {{candidate function}} 
   S (S);  // expected-error {{copy constructor must pass its first argument by reference}} \\
           // expected-note {{candidate function}}
};

S f();

void g() { 
  S a( f() );  // expected-error {{call to constructor of 'a' is ambiguous}}
}