blob: 9c75f92f34d6d9a5b28b1445b2f342416699b899 [file] [log] [blame]
Argyrios Kyrtzidis67643342010-06-29 22:47:00 +00001// 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
Richard Smith4fc50892013-06-26 02:41:25 +00006// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s -error-on-deserialized-decl doNotDeserialize
7
8// Test with modules.
9// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-friends.h -fmodules
10// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s -error-on-deserialized-decl doNotDeserialize -fmodules
Argyrios Kyrtzidis67643342010-06-29 22:47:00 +000011
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +000012// expected-no-diagnostics
13
Argyrios Kyrtzidis67643342010-06-29 22:47:00 +000014class F {
15 void m() {
16 A* a;
17 a->x = 0;
18 }
19};
Richard Smith6e21b162012-04-22 02:13:50 +000020
21template<typename T> class PR12585::future_base::setter {
22public:
23 int f() {
24 return promise<T*>().k;
25 }
26};
27int k = PR12585::future_base::setter<int>().f();
Richard Smith4fc50892013-06-26 02:41:25 +000028
29Lazy::S *p;