1 // RUN: %clang_cc1 %s -emit-pch -o %t.pch 2 // RUN: %clang_cc1 %s -emit-llvm %s -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 40