[clang] Enable AST mutation in the constant evaluator (PR #115168)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 14:06:29 PST 2024


Endilll wrote:

> For such an implementation that makes that choice, it would seem appropriate for define_aggregate to also be idempotent. But that should be a specific rule for that implementation, not a rule that appears in the standard. And we certainly shouldn't change the standard to require this unusual implementation-specific rule to be implemented by all C++ implementations

@zygoloid would it be correct to say that you want the Standard to leave idempotency of functions with side effects up to implementations, and, consequently, you want the model of how side effects are integrated into constant evaluation to work for both idempotent and non-idempotent functions?

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


More information about the cfe-commits mailing list