diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-29 04:57:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-29 04:57:11 +0000 |
commit | 593770b4bac904cdb9bf46ab3d166b0800c7a9f4 (patch) | |
tree | d3d7d0aca683b0cd28628734bbd29a83b57c2c28 /test/Headers | |
parent | e80622fd48261b6e5c7e6629dcfee2f76b124487 (diff) |
Define _Bool, bool, true, and false macros in <stdbool.h> when we're
in a GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r-- | test/Headers/stdbool.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Headers/stdbool.cpp b/test/Headers/stdbool.cpp new file mode 100644 index 0000000000..a252cca1a6 --- /dev/null +++ b/test/Headers/stdbool.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -E -dM %s | FileCheck --check-prefix=CHECK-GNU-COMPAT %s +// RUN: %clang_cc1 -std=c++98 -E -dM %s | FileCheck --check-prefix=CHECK-CONFORMING %s +#include <stdbool.h> +#define zzz + +// CHECK-GNU-COMPAT: #define _Bool bool +// CHECK-GNU-COMPAT: #define bool bool +// CHECK-GNU-COMPAT: #define false false +// CHECK-GNU-COMPAT: #define true true + +// CHECK-CONFORMING-NOT: #define _Bool +// CHECK-CONFORMING: #define __CHAR_BIT__ +// CHECK-CONFORMING-NOT: #define false false +// CHECK-CONFORMING: #define zzz |