[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:58:07 PDT 2023


================
@@ -14143,8 +14145,9 @@ static void AnalyzeComparison(Sema &S, BinaryOperator *E) {
   }
 
   // Otherwise, calculate the effective range of the signed operand.
-  IntRange signedRange = GetExprRange(
-      S.Context, signedOperand, S.isConstantEvaluated(), /*Approximate*/ true);
+  IntRange signedRange =
+      GetExprRange(S.Context, signedOperand, 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