<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/68734>68734</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Feature Request: More info from Static Anlyzer 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          leek2
      </td>
    </tr>
</table>

<pre>
    I was using the array bounds analysis output to SARIF and got a warning.  But it was a little hard to figure out exactly what was wrong.  clang does a great job of showing the code path on which the error was triggered, but it doesn't say:
Which array it was triggered on
What the out-of-bounds index was determined to be
What the length of the array was determined to be. 

I'm using clang 15, I admit I haven't checked personally, but my coworker on 17 saw the same behavior. 

Here's a simple example that can be used to duplicate this "issue":
int main() { 
    int aa[5];
    int bb[3] = { 1,2,3 };

    for(int ii = 0; ii < 5; ++ii) {
        aa[ii] = bb[ii];
 }

    return aa[4];
}

Thanks

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxslMFyozgQhp9GXLriAskEcuBgx-VaH_Yys1V7bqQGNBGSVxJhvE-_JeHEM6n1wRKov_7_7gYwBD1aoo7VR1afClzi5HxniN540Tt16y6wYoAlaDtCnAjQe7xB7xarAqBFcws6gFvidYkQHXw_fLucAa2C0UVAWNFbbccdwHGJoGNOh2B0jIZgQq8SNehx8ZTSAP1EGc0N1gm34NW7zEuDdgTlKPGjJ4zww_XgBgiTWz_8SacIrhgncBbWScsp3ybvnc_potfjSJ4U46_Qb55SUst4EyHgjYkDK0-sPPyd6a3gu_FPGJz9CMKYFdwSn9zwdO-Mtop-ZkRRJD9rS7nQnr5ghuyYzA6_dPf_sB1s4PZ_YbyZ71PZ-lLVqZ4LoJp1hAtM-E5bSXIi-UYKruSDs2jM7aPy-QbSrc6_kU_dqhoIuGYfAWeCniZ8187_Lv0HeWK8SUMIer4aShPLa0w1SbTQEyxhM66Wq9ESYzrVARjnOoSFGOefbdY2wozaMt4y_gKsOd71AADSISKrjzWrT0wcfz_pe1YfBatPwMQpkxXjr5zxVwGsecQ_qMF5xtvEap2hkonjtn-FOu0ZPzJ-1Pru5YGmX7ai9Ydi1s-XD2tJ94uop7h4u8H7X4O_xP41oX0L275QnVAv4gUL6qrnl-eXZ962dTF1g6qEEFK1g2iHXipRCSn4oBrZiraUZaE7XnJRlVVZtWK_r3cVlrhXDS9VLRvCPduXNKM2O2Pe553zY5Fn0j23jdgXBnsyIX8QOLe0wufA6lPhu8Q89csY2L40OsTwyBJ1NNSdCWN6l7_RPwuFyMQB_nSeQNvBweDdDN8jRi3hYM3tX_JQLN50U4zXkB4Jfmb8POo4Lf1Oupnxc8p_X56u3v0gGRk_Z1eB8XN2_V8AAAD__9h2fJ8">