[clang] [Clang] Handle consteval expression in array bounds expressions (PR #66222)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 13 19:57:35 PDT 2023


================
@@ -15090,8 +15093,9 @@ static void CheckImplicitConversion(Sema &S, Expr *E, QualType T,
   if (SourceBT && TargetBT && SourceBT->isIntegerType() &&
       TargetBT->isFloatingType() && !IsListInit) {
     // Determine the number of precision bits in the source integer type.
-    IntRange SourceRange = GetExprRange(S.Context, E, S.isConstantEvaluated(),
-                                        /*Approximate*/ true);
+    IntRange SourceRange =
+        GetExprRange(S.Context, E, S.isConstantEvaluatedContext(),
+                     /*Approximate*/ true);
----------------
shafik wrote:

```suggestion
                     /*Approximate=*/ true);
```

https://github.com/llvm/llvm-project/pull/66222


More information about the cfe-commits mailing list