2 Commits

Author SHA1 Message Date
Timm Baeder
e8674af6f4
[clang][bytecode] Diagnose IntegralToPointer casts to non-void (#123619)
But keep evaluating. This is what the current interpreter does as well.
2025-01-20 17:41:18 +01:00
yronglin
8079a2c578
[clang][bytecode] Diagnose reference to non-constexpr variable of const type in C23 constexpr (#112211)
```cpp
const int V33 = 4;
const int V34 = 0;
const int V35 = 2;

constexpr int V36 = V33 / V34;
// expected-error@-1 {{constexpr variable 'V36' must be initialized by a constant expression}}
constexpr int V37 = V33 / V35;
// expected-error@-1 {{constexpr variable 'V37' must be initialized by a constant expression}}
```

---------

Signed-off-by: yronglin <yronglin777@gmail.com>
2024-10-16 00:11:12 +08:00