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

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 25 13:05:48 PST 2024


Endilll wrote:

> the special "the language rules say this is manifestly constant evaluated" cases that should be able to perform AST mutations, that we need to be extremely careful to invoke at exactly the right times and in exactly the right cases and to invoke only once

Can you expand on the "to invoke only once" bit? As I understand the position of authors of P2996, calls to `define_aggregate` with the same arguments are supposed to be idempotent. Do you see reasons why we wouldn't be able to achieve that, meaning that we need to prevent `define_aggregate` to be called multiple times (with the same arguments) on the language level?

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


More information about the cfe-commits mailing list