xgupta added a comment.

In D155457#4523227 <https://reviews.llvm.org/D155457#4523227>, @aaron.ballman 
wrote:

> In D155457#4513812 <https://reviews.llvm.org/D155457#4513812>, @xgupta wrote:
>
>> In D155457#4511652 <https://reviews.llvm.org/D155457#4511652>, 
>> @aaron.ballman wrote:
>>
>>> In the x86 compilation: `sizeof(std::size_t) < sizeof(uint64_t)` is true, 
>>> so we test the other expression; because `Size` is greater than 
>>> `__SIZE_MAX__` the function returns false and the second static assertion 
>>> fails as expected.
>>> In the x64 compilation: `sizeof(std::size_t) < sizeof(uint64_t)` is false 
>>> (first static assertion fails) so we shouldn't even be evaluating the RHS 
>>> of the `&&` to see if it's tautological because it can't contribute to the 
>>> expression result, right?
>>
>> Yes, I agree with both statements but what is odd in current behavior?
>
> It's a false positive -- the tautological bit is diagnosed but it doesn't 
> contribute to the result of the expression. The first part of the predicate 
> is specifically intended to ensure the second part of the predicate is *not* 
> tautological.

Ok, Is there any modification required in this patch or it fixes that false 
positive?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155457

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

Reply via email to