================ @@ -12102,7 +12102,12 @@ class IntExprEvaluator } bool VisitTypeTraitExpr(const TypeTraitExpr *E) { - return Success(E->getValue(), E); + if (E->isStoredAsBoolean()) + return Success(E->getBoolValue(), E); + if (E->getAPValue().isAbsent()) + return false; + assert(E->getAPValue().isInt() && "APValue type not supported"); ---------------- erichkeane wrote:
would be nice to sprinkle this assert for `isInt` in a few other places so that the next person to try to use a non-bool type trait can get this assert without trying to do constant evaluation (say in the constructor?). 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