| Issue |
115137
|
| Summary |
Analyzer warns about an uninitialized value on a structured binding captured in a lambda
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
KitsuneRal
|
In C++17, structured bindings could not be immediately captured in lambdas; in C++20 they can but Clang analyzer didn't seem to catch up with this. This small program:
```cplusplus
#include <tuple>
#include <iostream>
int main()
{
std::tuple<std::size_t> t{ 1 };
auto&& [a] = t;
[a] {
std::cout << a << std::endl;
}();
}
```
triggers an uninitialised value warning inside the lambda, as can be seen at https://godbolt.org/z/sPsW4Pnr4.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs