<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello!<br>
<br>
Here is a patch that will make Clang warn when there is this index out of bounds:<br>
<br>
void f(int x) {<br>
int a[10];<br>
if (x >= 10)<br>
a[x] = x;<br>
} <br>
<div><br>
The checkLocation is not triggered on the "a[x] = x;" statement. Is this by design? Is the checkPrestmt a good choice or would it be better to choose some other check type?<br>
<br>
Best regards,<br>
Daniel Marjamäki<br>
<br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt">..................................................................................................................</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:black; font-size:8pt">Daniel Marjamäki
</span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt">Senior Engineer</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8.5pt" lang="EN-US">Evidente ES East</span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-US"> AB<span>
</span>Warfvinges väg 34<span> </span>SE-112 51 Stockholm<span> </span>Sweden </span>
</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-US"></span> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB">Mobile</span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB">:<span>
</span>+46 (0)709 12 42 62</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB"></span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB">E-mail:<span>
</span><span> <a href="mailto:Daniel.Marjamaki@evidente.se" tabindex="0">
Daniel.Marjamaki</a></span><a href="mailto:Daniel.Marjamaki@evidente.se" tabindex="0">@evidente.se</a><span>
</span><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB"></span> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; font-size:8pt" lang="EN-GB">www.evidente.se</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>