]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Rewriter/objc-bool-literal-modern-1.mm
Fix-up EOL-styles changed by upstream.
[FreeBSD/FreeBSD.git] / test / Rewriter / objc-bool-literal-modern-1.mm
1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp 
2 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"__declspec(X)=" %t-rw.cpp
3 // rdar://11231426
4
5 // rdar://11375908
6 typedef unsigned long size_t;
7
8 typedef bool BOOL;
9
10 BOOL yes() {
11   return __objc_yes;
12 }
13
14 BOOL no() {
15   return __objc_no;
16 }
17
18 BOOL which (int flag) {
19   return flag ? yes() : no();
20 }
21
22 int main() {
23   which (__objc_yes);
24   which (__objc_no);
25   return __objc_yes;
26 }
27
28 void y(BOOL (^foo)());
29
30 void x() {
31     y(^{
32         return __objc_yes;
33     });
34 }