[clang] [NFC] Replace bool <= bool comparison (PR #102948)
Mital Ashok via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 12 11:23:31 PDT 2024
================
@@ -542,7 +542,7 @@ NarrowingKind StandardConversionSequence::getNarrowingKind(
// If the bit-field width was dependent, it might end up being small
// enough to fit in the target type (unless the target type is unsigned
// and the source type is signed, in which case it will never fit)
- if (DependentBitField && (FromSigned <= ToSigned))
+ if (DependentBitField && !(FromSigned && !ToSigned))
----------------
MitalAshok wrote:
This could be
```suggestion
if (DependentBitField && (!FromSigned || ToSigned))
```
But the way written follows the comment exactly and should optimise the same
https://github.com/llvm/llvm-project/pull/102948
More information about the cfe-commits
mailing list