From: Nuno Lopes Date: Mon, 7 May 2012 20:23:03 +0000 (+0000) Subject: make this test a little more useful. I'll add more tests for bound checking once... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9eecef16fe1f8ab4735062e1c670ad982ae912a2;p=clang make this test a little more useful. I'll add more tests for bound checking once -fbounds-checking patch gets in git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156321 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/catch-undef-behavior.c b/test/CodeGen/catch-undef-behavior.c index fef1587fad..c2ad7c2672 100644 --- a/test/CodeGen/catch-undef-behavior.c +++ b/test/CodeGen/catch-undef-behavior.c @@ -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; +}