[PATCH] D39122: [Sema] Fixes for enum handling for tautological comparison diagnostics

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 14:01:30 PDT 2017


lebedev.ri updated this revision to Diff 119705.
lebedev.ri marked 5 inline comments as done.
lebedev.ri added a comment.

Addressed review notes.

For C++, enum handling clearly needs more work, because not all tautological comparisons are actually diagnosed, 
so there is no `clang/test/Sema/outof-range-enum-constant-compare.cpp`, `clang/test/Sema/tautological-constant-enum-compare.cpp` for this very reason.


Repository:
  rL LLVM

https://reviews.llvm.org/D39122

Files:
  lib/Sema/SemaChecking.cpp
  test/Sema/outof-range-enum-constant-compare.c
  test/Sema/tautological-constant-enum-compare.c
  test/Sema/tautological-unsigned-enum-zero-compare.c
  test/Sema/tautological-unsigned-enum-zero-compare.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39122.119705.patch
Type: text/x-patch
Size: 43664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171020/2d768843/attachment-0001.bin>


More information about the cfe-commits mailing list