================
@@ -142,6 +142,11 @@ bool Expr::isKnownToHaveBooleanValue(bool Semantic) const {
// If this is a non-scalar-integer type, we don't care enough to try.
if (!E->getType()->isIntegralOrEnumerationType()) return false;
+ if (!Semantic)
+ if (const auto *BIT = E->getType()->getAs<BitIntType>())
+ if (BIT->isUnsigned() && BIT->getNumBits() == 1)
----------------
zwuis wrote:
```cpp
if (const auto *BIT = ...;
BIT && ...)
```
https://github.com/llvm/llvm-project/pull/195793
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits