[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 12 06:41:18 PDT 2023
================
@@ -366,8 +363,7 @@ namespace ArrayInitLoop {
auto [a, b, c] = f(n).arr;
return a + b + c;
}
- static_assert(g() == 6); // expected-error {{failed}} \
- // expected-note {{15 == 6}}
+ static_assert(g() == 6);
----------------
tbaederr wrote:
```suggestion
static_assert(g() == 6, "");
```
https://github.com/llvm/llvm-project/pull/68039
More information about the cfe-commits
mailing list