]> granicus.if.org Git - clang/commitdiff
make this test a little more useful. I'll add more tests for bound checking once...
authorNuno Lopes <nunoplopes@sapo.pt>
Mon, 7 May 2012 20:23:03 +0000 (20:23 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Mon, 7 May 2012 20:23:03 +0000 (20:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156321 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/catch-undef-behavior.c

index fef1587fad007b0679fc72bf6f8016ea1233cc2c..c2ad7c26720e5fbe7b869c4065604f1abc05e93a 100644 (file)
@@ -1,7 +1,17 @@
-// RUN: %clang_cc1 -fcatch-undefined-behavior -emit-llvm-only %s
+// RUN: %clang_cc1 -fcatch-undefined-behavior -emit-llvm %s -o - | FileCheck %s
 
 // PR6805
+// CHECK: @foo
 void foo() {
   union { int i; } u;
+  // CHECK: objectsize
+  // CHECK-NEXT: icmp uge
   u.i=1;
 }
+
+// CHECK: @bar
+int bar(int *a) {
+  // CHECK: objectsize
+  // CHECK-NEXT: icmp uge
+  return *a;
+}