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 | 1f7d02fb6df4852573bc292b88a3b344ecab08c9 (patch) | |
tree | a011263bc10dc7ee38ed8cb8c276ecd64287b557 /clang/test/Headers/stdbool.cpp | |
parent | 52e60208830e04c4f7b5e258fd9afc45fa505890 (diff) | |
download | bcm5719-llvm-1f7d02fb6df4852573bc292b88a3b344ecab08c9.tar.gz bcm5719-llvm-1f7d02fb6df4852573bc292b88a3b344ecab08c9.zip |
Define _Bool, bool, true, and false macros in <stdbool.h> when we're
in a GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>.
llvm-svn: 115028
Diffstat (limited to 'clang/test/Headers/stdbool.cpp')
-rw-r--r-- | clang/test/Headers/stdbool.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Headers/stdbool.cpp b/clang/test/Headers/stdbool.cpp new file mode 100644 index 00000000000..a252cca1a6a --- /dev/null +++ b/clang/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 |