================ @@ -368,7 +368,11 @@ std::optional<SVal> SValBuilder::getConstantVal(const Expr *E) { case Stmt::TypeTraitExprClass: { const auto *TE = cast<TypeTraitExpr>(E); - return makeTruthVal(TE->getValue(), TE->getType()); + if (TE->isStoredAsBoolean()) + return makeTruthVal(TE->getBoolValue(), TE->getType()); + if (TE->getType()->isIntegralOrEnumerationType()) + return makeIntVal(TE->getAPValue().getInt()); + return std::nullopt; ---------------- shafik wrote:
How could we end up here? Is this tested? https://github.com/llvm/llvm-project/pull/131515 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits