Argyrios Kyrtzidis | 74d28bd | 2010-06-29 22:47:00 +0000 | [diff] [blame] | 1 | // Test this without pch. |
| 2 | // RUN: %clang_cc1 -include %S/cxx-friends.h -fsyntax-only -verify %s |
| 3 | |
| 4 | // Test with pch. |
| 5 | // RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-friends.h |
| 6 | // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s |
| 7 | |
| 8 | class F { |
| 9 | void m() { |
| 10 | A* a; |
| 11 | a->x = 0; |
| 12 | } |
| 13 | }; |
Richard Smith | e85e176 | 2012-04-22 02:13:50 +0000 | [diff] [blame] | 14 | |
| 15 | template<typename T> class PR12585::future_base::setter { |
| 16 | public: |
| 17 | int f() { |
| 18 | return promise<T*>().k; |
| 19 | } |
| 20 | }; |
| 21 | int k = PR12585::future_base::setter<int>().f(); |