[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 06:16:10 PDT 2017


lebedev.ri updated this revision to Diff 117802.
lebedev.ri marked 2 inline comments as done.
lebedev.ri added a subscriber: rtrieu.
lebedev.ri added a comment.

- Address review notes
- ~~Avoid re-evaluating ICE when called from `DiagnoseOutOfRangeComparison()` which already knows the evaluated value~~

  Don't even check if this is a Type Limit in `DiagnoseOutOfRangeComparison()`. Perhaps @rtrieu can shed some light on this.
- Enhance test coverage a little (add a test with macro, with template)


Repository:
  rL LLVM

https://reviews.llvm.org/D38101

Files:
  docs/ReleaseNotes.rst
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaChecking.cpp
  test/Sema/outof-range-constant-compare.c
  test/Sema/tautological-constant-compare.c
  test/Sema/tautological-unsigned-zero-compare.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38101.117802.patch
Type: text/x-patch
Size: 36842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171005/72750777/attachment-0001.bin>


More information about the cfe-commits mailing list