[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 1 01:17:05 PST 2025


dtcxzyw wrote:

> If I am reading the code correctly there should be some constexpr cases that generate a diagnostic, can we verify that with a test?

It has been tested by the following case:
```
extern int &Recurse1;
int &Recurse2 = Recurse1;
int &Recurse1 = Recurse2;
constexpr int &Recurse3 = Recurse2;
```
Without diagnostic-related code in this patch, we will lose some notes on `Recurse2`.


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


More information about the cfe-commits mailing list