[PATCH] D40698: [ubsan] Diagnose reached-unreachable after noreturn calls
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 30 17:59:05 PST 2017
vsk created this revision.
It's possible to reach an 'unreachable' instruction if a call to a
noreturn function returns. Diagnose this behavior.
Note: Most of the changes in this patch -- passing empty SourceLocations
in places where they are either not needed or do not apply -- are NFC.
Testing: check-clang, check-ubsan, check-ubsan-minimal
rdar://33660464
https://reviews.llvm.org/D40698
Files:
lib/CodeGen/CGAtomic.cpp
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGException.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CGExprComplex.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CGObjCGNU.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/MicrosoftCXXABI.cpp
test/CodeGenCXX/ubsan-unreachable.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40698.125066.patch
Type: text/x-patch
Size: 19689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171201/91311985/attachment-0001.bin>
More information about the cfe-commits
mailing list