summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/trapv.c
Commit message (Collapse)AuthorAgeFilesLines
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230795 91177308-0d34-0410-b5e6-96231b3b80d8
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-4/+4
| | | | | | tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove divison-by-zero checks from -ftrapv. These checks were incompatible withRichard Smith2012-11-011-0/+9
| | | | | | | | g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still available under -fcatch-undefined-behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167258 91177308-0d34-0410-b5e6-96231b3b80d8
* -fcatch-undefined-behavior: emit calls to the runtime library whenever one ↵Richard Smith2012-10-091-1/+0
| | | | | | of the checks fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
* -fcatch-undefined-behavior: Factor emission of the creation of, and branch to,Richard Smith2012-09-081-3/+6
| | | | | | | | | | the trap BB out of the individual checks and into a common function, to prepare for making this code call into a runtime library. Rename the existing EmitCheck to EmitTypeCheck to clarify it and to move it out of the way of the new EmitCheck. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163451 91177308-0d34-0410-b5e6-96231b3b80d8
* -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caughtRichard Smith2012-08-251-0/+1
| | | | | | | | | | | | | | | | | by this mode, and also check for signed left shift overflow. The rules for the latter are a little subtle: * neither C89 nor C++98 specify the behavior of a signed left shift at all * in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior * in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has undefined behavior As of this change, we use the C99 rules for all C language variants, and the C++11 rules for all C++ language variants. Once we have individual -fcatch-undefined-behavior= flags, this should be revisited. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162634 91177308-0d34-0410-b5e6-96231b3b80d8
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-11/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct -ftrapv to trap on errors, instead of calling theChris Lattner2010-08-071-24/+3
| | | | | | | | | | | | | | | | | | __overflow_handler entrypoint that David Chisnall made up. Calling __overflow_handler is not part of the contract of -ftrapv provided by GCC, and should never have been checked in in the first place. According to: http://permalink.gmane.org/gmane.comp.compilers.clang.devel/8699 David is using this for some of arbitrary precision integer stuff or something, which is not an appropriate thing to implement on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110490 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a major bug with -ftrapv and ++/--. Patch by David Keaton!John McCall2010-08-051-3/+65
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110347 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, almost forgot the testcases.Mike Stump2009-04-021-0/+10
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68270 91177308-0d34-0410-b5e6-96231b3b80d8