llvm-project/clang/test/CodeGenObjCXX
Alex Lorenz c1608f7f69 Add -f[no-]strict-return flag that can be used to avoid undefined behaviour
in non-void functions that fall off at the end without returning a value when
compiling C++.

Clang uses the new compiler flag to determine when it should treat control flow
paths that fall off the end of a non-void function as unreachable. If
-fno-strict-return is on, the code generator emits the ureachable and trap
IR only when the function returns either a record type with a non-trivial
destructor or another non-trivially copyable type.

The primary goal of this flag is to avoid treating falling off the end of a
non-void function as undefined behaviour. The burden of undefined behaviour
is placed on the caller instead: if the caller ignores the returned value then
the undefined behaviour is avoided. This kind of behaviour is useful in
several cases, e.g. when compiling C code in C++ mode.

rdar://13102603

Differential Revision: https://reviews.llvm.org/D27163

llvm-svn: 290960
2017-01-04 13:40:34 +00:00
..
Inputs
2007-10-03-MetadataPointers.mm
2010-08-04-Template.mm
2010-08-06-X.Y-syntax.mm
address-safety-attr.mm
arc-attrs.mm Forward ns_consumed delegate arguments with a move. 2016-11-18 01:08:24 +00:00
arc-blocks.mm CodeGen: further merge cstring literal construction 2016-09-20 18:38:54 +00:00
arc-constexpr.mm [CodeGen][ObjC] Do not call objc_storeStrong when initializing a 2016-10-18 19:05:41 +00:00
arc-cxx11-init-list.mm CodeGen: try harder to make the CFString structure RW 2016-07-29 19:15:51 +00:00
arc-cxx11-member-init.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
arc-exceptions.mm Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:55:59 +00:00
arc-globals.mm Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. 2016-12-23 00:23:01 +00:00
arc-mangle.mm Fix mangled name of method with ns_consumed parameters. 2016-05-25 14:15:08 +00:00
arc-move.mm Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. 2016-12-23 00:23:01 +00:00
arc-new-delete.mm Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. 2016-12-23 00:23:01 +00:00
arc-pseudo-destructors.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
arc-references.mm Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. 2016-12-23 00:23:01 +00:00
arc-returns-inner-reference-ptr.mm
arc-special-member-functions.mm Remove custom handling of array copies in lambda by-value array capture and 2016-12-14 00:03:17 +00:00
arc-weak.mm Correctly handle type mismatches in the __weak copy/move-initialization 2015-11-16 22:11:41 +00:00
arc.mm Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. 2016-12-23 00:23:01 +00:00
auto-release-result-assert.mm [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog 2016-02-17 21:09:50 +00:00
block-default-arg.mm [CodeGenObjCXX] Don't rematerialize default arguments of function 2016-05-02 21:52:57 +00:00
block-id.mm
block-in-template-inst.mm
block-nested-in-lambda.cpp [CodeGenObjCXX] Fix handling of blocks in lambda. 2016-05-04 18:40:33 +00:00
block-var-layout.mm Fix and stylize the emission of GC/ARC ivar and GC block layout strings. 2015-10-21 18:06:47 +00:00
blocks.mm Reapply "[CodeGen] Fix assignments of inline layouts into the byref structure" 2015-12-21 20:21:15 +00:00
catch-id-type.mm Update clang to take into account the changes to personality fns 2015-06-17 20:53:19 +00:00
copy.mm Replace Sema-level implementation of -fassume-sane-operator-new with a 2016-04-07 21:46:12 +00:00
copyable-property-object.mm
debug-info-block-capture-this.mm DebugInfo: Adapt to loss of DITypeRef in LLVM r267296 2016-04-23 21:08:27 +00:00
debug-info-cyclic.mm DebugInfo: pass alignment value only if it was forced 2016-10-20 00:13:19 +00:00
debug-info-line.mm Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
debug-info.mm Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
designated-initializers.mm [test] Follow-up for r243343, also add a test case using an enum for designated enum. 2015-07-28 00:01:13 +00:00
destroy.mm Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. 2016-12-23 00:23:01 +00:00
encode.mm CodeGen: mark ObjC cstring literals as unnamed_addr 2016-09-18 16:12:14 +00:00
exception-cxx.mm [test] Specify exception object type in two tests 2015-09-11 17:39:34 +00:00
exceptions-legacy.mm Update clang unittests for rL281586. 2016-09-15 06:31:30 +00:00
exceptions.mm Update clang to take into account the changes to personality fns 2015-06-17 20:53:19 +00:00
externally-initialized-selectors.mm
foreach-statement.mm
gc.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
implementation-in-extern-c.mm
implicit-copy-assign-operator.mm
implicit-copy-constructor.mm Remove custom handling of array copies in lambda by-value array capture and 2016-12-14 00:03:17 +00:00
ivar-objects.mm
lambda-expressions.mm Cleanup the handling of noinline function attributes, -fno-inline, 2016-12-23 01:24:49 +00:00
literals.mm Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'. 2016-12-23 00:23:01 +00:00
lvalue-reference-getter.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
mangle-blocks.mm
mangle.mm Fix mangled name of method with ns_consumed parameters. 2016-05-25 14:15:08 +00:00
message-reference.mm Add a bunch of missing "CHECK" colons in tests. NFC. 2015-03-14 01:10:19 +00:00
message.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
method-local-extern-mangle.mm
microsoft-abi-arc-param-order.mm
mrc-weak.mm Don't actually add the __unsafe_unretained qualifier in MRC; 2015-11-19 02:28:03 +00:00
nested-ehlocation.mm Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
nrvo.mm
objc-container-subscripting-1.mm
objc-container-subscripting.mm
personality-abuse.mm Fix broken tests from no-jump-table commit 2016-04-05 18:59:37 +00:00
pr14474-gline-tables-only.mm Stop messing with the 'g' group of options in CompilerInvocation. 2015-10-08 04:24:12 +00:00
property-derived-to-base-conv.mm
property-dot-copy.mm
property-dot-reference.mm
property-lvalue-capture.mm Compute and preserve alignment more faithfully in IR-generation. 2015-09-08 08:05:57 +00:00
property-object-conditional-exp.mm Compute and preserve alignment more faithfully in IR-generation. 2015-09-08 08:05:57 +00:00
property-object-reference-1.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
property-object-reference-2.mm Re-commit r282556, reverted in r282564, with a fix to CallArgList::addFrom to 2016-09-28 19:09:10 +00:00
property-object-reference.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
property-objects.mm CodeGen: Update for debug info API change. 2015-11-05 22:04:14 +00:00
property-reference.mm Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00
refence-assign-write-barrier.mm
references.mm
return.mm Add -f[no-]strict-return flag that can be used to avoid undefined behaviour 2017-01-04 13:40:34 +00:00
rtti.mm
selector-expr-lvalue.mm Let selector-expr-lvalue.mm actually test something. 2015-09-11 21:24:40 +00:00
subst-sel.mm
unknown-anytype.mm
write-barrier-global-assign.mm