Fix PR5211: codegen shouldn't assume that the result of ||/&& is int
anymore. In C++ it is bool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84308 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/expr.cpp b/test/CodeGenCXX/expr.cpp
index ae5b0e6..4dc97c4 100644
--- a/test/CodeGenCXX/expr.cpp
+++ b/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] );
+}