Douglas Gregor | 83bc276 | 2012-02-20 16:12:14 +0000 | [diff] [blame] | 1 | // 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 | |||||
11 | template<typename T> | ||||
12 | class New { | ||||
13 | New(const New&); | ||||
14 | |||||
15 | public: | ||||
16 | New *clone() { | ||||
17 | return new New(*this); | ||||
18 | } | ||||
19 | }; | ||||
20 | |||||
21 | #else | ||||
22 | |||||
23 | New<int> *clone_new(New<int> *n) { | ||||
24 | return n->clone(); | ||||
25 | } | ||||
26 | |||||
27 | #endif |