1// RUN: %clang_cc1 -E %s -o %t.mm 2// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s 3// rdar://11124775 4 5typedef bool BOOL; 6 7BOOL yes() { 8 return __objc_yes; 9} 10 11BOOL no() { 12 return __objc_no; 13} 14 15BOOL which (int flag) { 16 return flag ? yes() : no(); 17} 18 19int main() { 20 which (__objc_yes); 21 which (__objc_no); 22 return __objc_yes; 23} 24 25// CHECK: return ((bool)1); 26// CHECK: return ((bool)0); 27// CHECK: which (((bool)1)); 28// CHECK: which (((bool)0)); 29// CHECK: return ((bool)1); 30