[ubsan] Omit return value check when return block is unreachable
If the return block is unreachable, clang removes it in CodeGenFunction::FinishFunction(). This removal can leave dangling references to values defined in the return block if the return block has successors, which it /would/ if UBSan's return value check is emitted. In this case, as the UBSan check wouldn't be reachable, it's better to simply not emit it. rdar://59196131
Loading
Please sign in to comment