Add missing safety check to an optimization for do-while loops.  PR14191.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166832 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/dostmt.c b/test/CodeGen/dostmt.c
index 1a2e02a..32e5f94 100644
--- a/test/CodeGen/dostmt.c
+++ b/test/CodeGen/dostmt.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o -
+// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
 
 int bar();
 int test0() {
@@ -66,5 +66,11 @@
   do { break; } while(0);
 }
 
- 
+// PR14191
+void test6f(void);
+void test6() {
+  do {
+  } while (test6f(), 0);
+  // CHECK call void @test6f()
+}