[clang] [clang] introduce constexpr step limit opt-out (PR #160440)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 8 06:47:30 PDT 2025


================
@@ -3686,6 +3686,9 @@ inline bool CheckDestruction(InterpState &S, CodePtr OpPC) {
 
 inline bool CheckArraySize(InterpState &S, CodePtr OpPC, uint64_t NumElems) {
   uint64_t Limit = S.getLangOpts().ConstexprStepLimit;
+  if (Limit == 0)
+    return true;
+
   if (NumElems > Limit) {
----------------
Sirraide wrote:

```suggestion
  if (Limit != 0 && NumElems > Limit) {
```

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


More information about the cfe-commits mailing list