summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/catch-undef-behavior.c
Commit message (Collapse)AuthorAgeFilesLines
...
* If we flow off the end of a value-returning function:Richard Smith2012-10-041-0/+8
| | | | | | | | - outside C++, return undef (behavior is not undefined unless the value is used) - in C++, with -fcatch-undefined-behavior, perform an appropriate trap - in C++, produce an 'unreachable' (behavior is undefined immediately) llvm-svn: 165273
* -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caughtRichard Smith2012-08-251-0/+25
| | | | | | | | | | | | | | | | 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. llvm-svn: 162634
* New -fcatch-undefined-behavior features:Richard Smith2012-08-241-3/+7
| | | | | | | | * when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check * check that references are bound to appropriate storage * check that 'this' has appropriate storage in member accesses and member function calls llvm-svn: 162523
* hopefully unbreak some buildbotsNuno Lopes2012-05-081-2/+2
| | | | llvm-svn: 156357
* make this test a little more useful. I'll add more tests for bound checking ↵Nuno Lopes2012-05-071-1/+11
| | | | | | once -fbounds-checking patch gets in llvm-svn: 156321
* Fix run line so this test actually tests something.Benjamin Kramer2010-04-111-1/+1
| | | | llvm-svn: 100962
* fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.Chris Lattner2010-04-101-0/+7
llvm-svn: 100938
OpenPOWER on IntegriCloud