llvm-project
ec2d6add - [clang] introduce constexpr step limit opt-out (#160440)

Commit
22 days ago
[clang] introduce constexpr step limit opt-out (#160440) To address @AaronBallman's feedback from https://github.com/llvm/llvm-project/pull/143785 this patch implements an explicit opt-out for `-fconstexpr-steps` by setting `-fconstexpr-steps=0`. This does not change any defaults, but gives users an easy way to opt out of this limit altogether (and instead let the compiler reach the system's resource limits). Currently users set `constexpr-steps` to some arbitrary high number (and I mean _arbitrary_ - see the tables in the previous PR). This isn't actually opting out of the limit though - you're still bound by the upper bound of the counter's type. If you have enough resources to evaluate more than 18446744073709551615 steps that's bad news. In any case, `=0` conveys the intent clearer. This is in line with how we handle other flags, ie `-ftemplate-backtrace-limit` or `-ferror-limit`.
Author
Parents
Loading