[cfe-commits] r156321 - /cfe/trunk/test/CodeGen/catch-undef-behavior.c

Nuno Lopes nunoplopes at sapo.pt
Mon May 7 13:23:04 PDT 2012


Author: nlopes
Date: Mon May  7 15:23:03 2012
New Revision: 156321

URL: http://llvm.org/viewvc/llvm-project?rev=156321&view=rev
Log:
make this test a little more useful. I'll add more tests for bound checking once -fbounds-checking patch gets in

Modified:
    cfe/trunk/test/CodeGen/catch-undef-behavior.c

Modified: cfe/trunk/test/CodeGen/catch-undef-behavior.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/catch-undef-behavior.c?rev=156321&r1=156320&r2=156321&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/catch-undef-behavior.c (original)
+++ cfe/trunk/test/CodeGen/catch-undef-behavior.c Mon May  7 15:23:03 2012
@@ -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;
+}





More information about the cfe-commits mailing list