From: Mike Stump Date: Thu, 2 Apr 2009 01:14:26 +0000 (+0000) Subject: Oops, almost forgot the testcases. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=947b3e2c51393a2ac39b63f5a5d9e4ba43f05d6a;p=clang Oops, almost forgot the testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68270 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/trapu.c b/test/CodeGen/trapu.c new file mode 100644 index 0000000000..640a6b1b7c --- /dev/null +++ b/test/CodeGen/trapu.c @@ -0,0 +1,10 @@ +// RUN: clang-cc -ftrapu %s -emit-llvm -o %t && +// RUN: grep "__overflow_handler" %t | count 3 + +unsigned int ui, uj, uk; +int i, j, k; + +void foo() { + ui = uj + uk; + i = j + k; +} diff --git a/test/CodeGen/trapv.c b/test/CodeGen/trapv.c new file mode 100644 index 0000000000..c96488b8e9 --- /dev/null +++ b/test/CodeGen/trapv.c @@ -0,0 +1,10 @@ +// RUN: clang-cc -ftrapv %s -emit-llvm -o %t && +// RUN: grep "__overflow_handler" %t | count 2 + +unsigned int ui, uj, uk; +int i, j, k; + +void foo() { + ui = uj + uk; + i = j + k; +}