xref: /llvm-project/clang/test/Rewriter/objc-bool-literal-modern.mm (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1 -x objective-c++ -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2// RUN: %clang_cc1 -fsyntax-only -D"__declspec(X)=" %t-rw.cpp
3
4typedef bool BOOL;
5
6BOOL yes() {
7  return __objc_yes;
8}
9
10BOOL no() {
11  return __objc_no;
12}
13
14BOOL which (int flag) {
15  return flag ? yes() : no();
16}
17
18int main() {
19  which (__objc_yes);
20  which (__objc_no);
21  return __objc_yes;
22}
23