[PATCH] D40698: [ubsan] Diagnose noreturn functions which return

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 18:56:30 PST 2017


vsk updated this revision to Diff 125069.
vsk retitled this revision from "[ubsan] Diagnose reached-unreachable after noreturn calls" to "[ubsan] Diagnose noreturn functions which return".
vsk edited the summary of this revision.
vsk added a comment.

- Emit the check in the noreturn function, so that the UB does not result in the optimizer throwing away the diagnostic instrumentation.


https://reviews.llvm.org/D40698

Files:
  docs/UndefinedBehaviorSanitizer.rst
  lib/CodeGen/CGBuiltin.cpp
  lib/CodeGen/CGCall.cpp
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CodeGenFunction.h
  test/CodeGen/ubsan-noreturn.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40698.125069.patch
Type: text/x-patch
Size: 4217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171201/dab839cd/attachment.bin>


More information about the cfe-commits mailing list