rtrieu added a comment.

  void foo(long x) {
    if ((x & 1) == 1L) return;  // bad always false warning here
    static_assert(sizeof(int) < sizeof(long), "long is bigger than int");
    static_assert((long(15) & 1) == 1L, "proof that condition can be true");
  }

I found this false positive case when testing your new patch.  The condition is 
fine, but it gives an always false warning.  When fixed, this would be another 
good test case to include.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130510/new/

https://reviews.llvm.org/D130510

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to