<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98341>98341</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Analyzer] False negative clang-analyzer-core.uninitialized.UndefReturn with std::array
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chrchr-github
</td>
</tr>
</table>
<pre>
~~~c++
#include <array>
int f() {
auto a = new std::array<int, 2>;
return a->at(1);
}
int g() {
std::array<int, 2> a;
return a.at(1);
}
int h() {
std::array<int, 2> a;
return a[1];
}
~~~
https://godbolt.org/z/q7szo445q
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyskkGOozoQhk9TbCyQKUPACxZJaA7wpHeAAgx45Jhu26SVLDj7CJJRpJ7WzGYky7ZUVf_nKv_kvR6tUhXkJ8jriJYwza7qJtdNLh51mJY2auf-Vq3r2gGetsVr4EdAoW1nll4xEGdyjm4g3p6xfdc2sAGwBJQMil9lXNISZkYMRM2s-mQ-9CCOII5PjbO2AfDMcJMTrzKnwuIsoxjEGwXAMgWUr4SiflHHb6h_wjD6DpT8hTL9EwrkpxTy-nfEuq6PyxTCu99UsQFsxrlvZxOS2Y2AzR2w-Sj8fc6y_CPqK9FLISlSVVogP2CBsoymihMRZl1b9lKkZUZDiUN2EK3Ie5mWRRvpCjlmvEh5euCpKJKhkKgGJbHneTtIDhlXF9ImMeZ62diR9n5RlSxFlkaGWmX87iHE7U_3ICBulnLVVhO3y-gh40b74F8qQQezm-9oydzuykFes4aMV8yqkYK-KtYZsmNMz4S4m51KFqutDpqMvqs--d_2avjvMdBPHaYvnooWZ6ovU9ydnXTzBbDZXvM84nc3_1BdAGz2Hjxg8-jxWuHPAAAA__9q5u1b">