blob: 9cd31941e3562eea48b8263544940b8d54602768 [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
8#ifndef HEADER
9#define HEADER
10
11template<typename T>
12class New {
13 New(const New&);
14
15public:
16 New *clone() {
17 return new New(*this);
18 }
19};
20
21#else
22
23New<int> *clone_new(New<int> *n) {
24 return n->clone();
25}
26
27#endif