blob: b7707e0b9347f4c5db5e38fb0e72e20c14bd0992 [file] [log] [blame]
Douglas Gregor83bc2762012-02-20 16:12:14 +00001// Test this without pch.
2// RUN: %clang_cc1 -include %s -verify -std=c++11 %s
3
4// Test with pch.
5// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
6// RUN: %clang_cc1 -include-pch %t -verify -std=c++11 %s
7
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00008// expected-no-diagnostics
9
Douglas Gregor83bc2762012-02-20 16:12:14 +000010#ifndef HEADER
11#define HEADER
12
13template<typename T>
14class New {
15 New(const New&);
16
17public:
18 New *clone() {
19 return new New(*this);
20 }
21};
22
23#else
24
25New<int> *clone_new(New<int> *n) {
26 return n->clone();
27}
28
29#endif