llvm-project/clang/test/Frontend/objc-bool-is-bool.m
Alex Lorenz 9229d332bf [Frontend] Add a predefined macro that describes the Objective-C bool type
This commit adds a new predefined macro named __OBJC_BOOL_IS_BOOL that describes
the Objective-C boolean type: its value is zero if the Objective-C boolean uses
the signed character type, otherwise its value is one as the Objective-C boolean
uses the builtin boolean type.

rdar://21170440

Differential Revision: https://reviews.llvm.org/D26234

llvm-svn: 287529
2016-11-21 11:05:15 +00:00

14 lines
548 B
Matlab

// RUN: %clang_cc1 -fsyntax-only -E -dM -triple=armv7k-apple-watchos %s | FileCheck --check-prefix=BOOL %s
// RUN: %clang_cc1 -fsyntax-only -E -dM -triple=x86_64-apple-darwin16 %s | FileCheck --check-prefix=CHAR %s
// RUN: %clang_cc1 -x c -fsyntax-only -E -dM -triple=x86_64-apple-darwin16 %s | FileCheck --check-prefix=NONE %s
// rdar://21170440
// BOOL: #define __OBJC_BOOL_IS_BOOL 1
// BOOL-NOT: #define __OBJC_BOOL_IS_BOOL 0
// CHAR: #define __OBJC_BOOL_IS_BOOL 0
// CHAR-NOT: #define __OBJC_BOOL_IS_BOOL 1
// NONE-NOT: __OBJC_BOOL_IS_BOOL