[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Thu May 15 12:05:48 PDT 2025


ahatanak wrote:

`evaluateVarDeclInit` is using the default argument expression (`default_val`) to evaluate the initializer of parameter `val`.

```
// Dig out the initializer, and use the declaration which it's attached to.
// FIXME: We should eventually check whether the variable has a reachable
// initializing declaration.
const Expr *Init = VD->getAnyInitializer(VD);
```

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


More information about the cfe-commits mailing list