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

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

S f();

void g() { 
  S a( f() );
}

OpenPOWER on IntegriCloud