[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
Wed Oct 4 12:29:49 PDT 2017


lebedev.ri updated this revision to Diff 117710.
lebedev.ri marked 6 inline comments as done.
lebedev.ri edited the summary of this revision.
lebedev.ri added a comment.

@rsmith thank you for the review!

Address review notes:

1. Merge `CheckTautologicalComparisonWithZero()` and `CheckTautologicalComparisonWithMinMax()`
2. Significantly deduplicate the code, hopefully not at the cost of readability.
3. Slightly cleanup/move around/update relevant tests for these three types of tautological comparisons.


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.117710.patch
Type: text/x-patch
Size: 34943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171004/db5b240e/attachment-0001.bin>


More information about the cfe-commits mailing list