summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/expr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-17 04:24:20 +0000
committerChris Lattner <sabre@nondot.org>2009-10-17 04:24:20 +0000
commit671fec8727926eebea88265905e54cb82fafecc7 (patch)
treeb2a9141a40953bf07b33d1e8b8db858feef6c3dc /clang/test/CodeGenCXX/expr.cpp
parent6e924a3090e54a52da133bbdb8add7b8ef528d3a (diff)
downloadbcm5719-llvm-671fec8727926eebea88265905e54cb82fafecc7.tar.gz
bcm5719-llvm-671fec8727926eebea88265905e54cb82fafecc7.zip
Fix PR5211: codegen shouldn't assume that the result of ||/&& is int
anymore. In C++ it is bool. llvm-svn: 84308
Diffstat (limited to 'clang/test/CodeGenCXX/expr.cpp')
-rw-r--r--clang/test/CodeGenCXX/expr.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/expr.cpp b/clang/test/CodeGenCXX/expr.cpp
index ae5b0e644f2..4dc97c47aa2 100644
--- a/clang/test/CodeGenCXX/expr.cpp
+++ b/clang/test/CodeGenCXX/expr.cpp
@@ -1,5 +1,12 @@
// RUN: clang-cc -emit-llvm -x c++ < %s
-void f(int x) {
+void test0(int x) {
if (x != 0) return;
}
+
+
+// PR5211
+void test1() {
+ char *xpto;
+ while ( true && xpto[0] );
+}
OpenPOWER on IntegriCloud