[clang] [clang][bytecode] Implement constexpr step limit (PR #176150)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 26 21:49:35 PST 2026
================
@@ -184,6 +188,7 @@ class InterpState final : public State, public SourceMapper {
SmallVectorImpl<PartialDiagnosticAt> *PrevDiags = nullptr;
unsigned SpeculationDepth = 0;
std::optional<bool> ConstantContextOverride;
+ unsigned StepsLeft;
----------------
tbaederr wrote:
We have this in `ExprConstant.cpp`:
```c++
bool nextStep(const Stmt *S) {
if (Ctx.getLangOpts().ConstexprStepLimit == 0)
return true;
```
so... `0` means infinite steps? Which this patch doesn't properly implement and can't be tested I guess.
https://github.com/llvm/llvm-project/pull/176150
More information about the cfe-commits
mailing list