comparison clang/test/PCH/irgen-rdar13114142.mm @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children c4bab56944e8
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-pch -o %t.pch
2 // RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -include-pch %t.pch -o - | FileCheck %s
3
4 #ifndef HEADER
5 #define HEADER
6
7 class OOArray{
8 public:
9 ~OOArray();
10 };
11
12 class OOString {
13 public:
14 OOString();
15 OOString(char *);
16 };
17
18 class OOPattern {
19 public:
20 OOArray matchAll(const OOString &)const {
21 __attribute__((__blocks__(byref))) OOArray out;
22 }
23 };
24
25 OOArray operator & (const OOPattern & pattern) {
26 pattern.matchAll(0);
27 }
28 OOArray operator & (OOString, OOString);
29
30 #else
31
32 // We just make sure there is no crash on IRGen (rdar://13114142)
33 // CHECK: _Z3foov()
34 void foo() {
35 OOString str;
36 str & "o";
37 }
38
39 #endif