comparison clang/test/PCH/cxx-friends.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
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 -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
11
12 // expected-no-diagnostics
13
14 class F {
15 void m() {
16 A* a;
17 a->x = 0;
18 }
19 };
20
21 template<typename T> class PR12585::future_base::setter {
22 public:
23 int f() {
24 return promise<T*>().k;
25 }
26 };
27 int k = PR12585::future_base::setter<int>().f();
28
29 Lazy::S *p;