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 7class OOArray{ 8public: 9 ~OOArray(); 10}; 11 12class OOString { 13public: 14 OOString(); 15 OOString(char *); 16}; 17 18class OOPattern { 19public: 20 OOArray matchAll(const OOString &)const { 21 __attribute__((__blocks__(byref))) OOArray out; 22 } 23}; 24 25OOArray operator & (const OOPattern & pattern) { 26 pattern.matchAll(0); 27} 28OOArray operator & (OOString, OOString); 29 30#else 31 32// We just make sure there is no crash on IRGen (rdar://13114142) 33// CHECK: _Z3foov() 34void foo() { 35 OOString str; 36 str & "o"; 37} 38 39#endif 40