Home | History | Annotate | Download | only in Rewriter
      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 // rdar://11124775
      4 
      5 typedef bool BOOL;
      6 
      7 BOOL yes() {
      8   return __objc_yes;
      9 }
     10 
     11 BOOL no() {
     12   return __objc_no;
     13 }
     14 
     15 BOOL which (int flag) {
     16   return flag ? yes() : no();
     17 }
     18 
     19 int main() {
     20   which (__objc_yes);
     21   which (__objc_no);
     22   return __objc_yes;
     23 }
     24