================
@@ -17176,10 +17176,13 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const 
CallExpr *E,
 
   case Builtin::BI__builtin_dynamic_object_size:
   case Builtin::BI__builtin_object_size: {
-    // The type was checked when we built the expression.
-    unsigned Type =
-        E->getArg(1)->EvaluateKnownConstInt(Info.Ctx).getZExtValue();
-    assert(Type <= 3 && "unexpected type");
+    APSInt TypeValue = E->getArg(1)->EvaluateKnownConstInt(Info.Ctx);
----------------
keepyixiao wrote:

Thanks for pointing this out. I will handle the unevaluable argument case in
a follow-up PR and track it in #231108.

https://github.com/llvm/llvm-project/pull/230979
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to