[clang] [clang] increase default constexpr step limit (PR #143785)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 11 22:09:40 PDT 2025


tbaederr wrote:

The linked standard says:
> Full-expressions evaluated within a core constant expression ([[expr.const]](https://eel.is/c++draft/expr.const)) [1 048 576][.](https://eel.is/c++draft/implimits#1.39.sentence-1)

Is that actually what the "steps" in clang refer to? We seem to check this for all statements: https://github.com/llvm/llvm-project/blob/99638537cd19b84252685a3dd56535a4d54d690e/clang/lib/AST/ExprConstant.cpp#L5466-L5467

And we check the limit for array sizes:
https://github.com/llvm/llvm-project/blob/99638537cd19b84252685a3dd56535a4d54d690e/clang/lib/AST/ExprConstant.cpp#L1077-L1088

... which is probably irrelevant for the discussion, but better to clarify.

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


More information about the cfe-commits mailing list