<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54533>54533</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang static analyzer falsely reports "1 uninitialized field at the end of the constructor call"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:static analyzer
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jimis
</td>
</tr>
</table>
<pre>
In general we get plenty of false positives, but here the logic looks simple enough for the analyzer to be able to track it. Details follow:
Detected with CodeChecker 6.18.2
Clang version: 13.0.1
Checker name: optin.cplusplus.UninitializedObject
Checker message: 1 uninitialized field at the end of the constructor call
Attaching the issue as a screenshot from CodeChecker as it is easier to follow the logic.
![screenshot from CodeChecker](https://user-images.githubusercontent.com/3584514/159969464-d0fa2c07-cac7-4c01-a0f0-b88410140878.png)
The code is at: https://github.com/qt/qtbase/blob/dfb4697e4a/src/corelib/text/qstring.h#L1602-L1647
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydU8tunDAU_RrYWCDbPAYWLNKJIlWq1E37AX5cwImxqW2STr6-F2baJl1kUWm4XM99nuOD9PoyfHZkAgdBWPIC6CayWnDpQvxIRmEjkNVHk8wzxIyfidwSmSEASTMQ6yej0PqnSKJZsJCA89s0k9GHI0M4YS-vgAdPJB4lpqCbglBPxKSS3EMSxkYssNa_ZNVdRu8zerMYBJVAkxeTZnL2Gs4zqCds15asK_k162yFm8gzhGi8ww6EVSUt2S14K3BigT3m12RcqVa7xf0pvzvjEJ2w5hX0V_mI88j7ygViFNNRzMj2Np2MBqwmIh1Qwemds91V3sUUNpWQBSWsJW9B3aUk1Gxw5T3VxLghL5EIElUAcHH2iYzBL-_wYoJJmExARHOl88rY33sob0M4y5pPH_TKmvuMd3NKa9zp5g_42yKEwiwIM5YTcr3J_R-EkVAKpfIL5lRNVzesRo81fd_2dVsXmo6CK3oqlFCnolaUFYKOtJBdVzPKatqdunJ1U8b7txR8OzjSO3pkb2f2_TrXFW5zf6TDSBEBHWm9xJceZd32J6gFHmJQaJUPYM0eTPDzqME7QJrLOePVF9ZSXqCtT7keKt1XvciTSRaGq3xiEgm1_Eevh_TthQRYfUiRZJz_7-1jab4FO3yA0drn369iDX5XIR4PbeBX99DUTVXl8yDGUVeyYn1Xq77heAVa9rSVXdN3imqWWyHBxgEFgEPVDgzn_QMNIyiB3Aycck4rXrMT7xgrx2rvKlp-0nXX6TarKSz4bZb7VqUPUx6GY0G5TRGD1sQU_wZFjGZyAMdw7C-2NPswPJrFxPxAMhwwfgHXCnZD">