diff options
author | Vedant Kumar <vsk@apple.com> | 2020-02-06 10:17:36 -0800 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2020-02-06 10:24:03 -0800 |
commit | 65f0785fff0e45f8cd1b9e90328597197beef899 (patch) | |
tree | 3804150c43d9e156557165f0f5f034d1bd0a00bf /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 600f2e1c4de59a48a765d9ac8eadab2f4307fa30 (diff) | |
download | llvm-65f0785fff0e45f8cd1b9e90328597197beef899.zip llvm-65f0785fff0e45f8cd1b9e90328597197beef899.tar.gz llvm-65f0785fff0e45f8cd1b9e90328597197beef899.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions