[PATCH] D30729: [ubsan] Skip range checks for width-limited values

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 7 18:04:39 PST 2017


vsk updated this revision to Diff 90975.
vsk added a comment.

- Fix an incorrect comment on the field "e2" in struct S. We emit a check for it because 0b11 = -1 = 3.
- Skip the range check on the field "e2" in struct S2, because the range of the bitfield is the same as the range clang infers for the enum.


https://reviews.llvm.org/D30729

Files:
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CodeGenFunction.h
  test/CodeGenCXX/ubsan-bitfields.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30729.90975.patch
Type: text/x-patch
Size: 5273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170308/73d58b2d/attachment-0001.bin>


More information about the cfe-commits mailing list