<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;"><br>
Hi,<br>
<br>
I've extended the check that warns for uninitialized arguments to:<br>
- warn for pointer arguments that point to uninitialized local (stack) variables. 
<br>
- warn for function calls with uninitialized arguments, when the corresponding function parameter is a const reference.
<br>
<br>
<b><font face="Courier New">void doStuff(const int *p);<br>
void doStuffRef(const int& c);<br>
<br>
void f(void) {<br>
      int x;<br>
      doStuff(&x);  // warning<br>
}<br>
</font></b><b><font face="Courier New"><b><font face="Courier New">void g(void) {<br>
      int x;<br>
      doStuffRef(x); //</font></b></font></b><b><font face="Courier New"><b><font face="Courier New"><b><font face="Courier New"> warning</font></b><br>
</font></b>    </font></b><br>
<br>
I've also parameterize the CallAndMessageChecker in a similar way as CheckSecuritySyntaxOnly.<br>
<br>
that is:<br>
// only check if arguments are uninitialized (the old functionality only)<br>
clang -cc1 -analyze -analyzer-checker=core.callandmessage uninit-const.cpp<br>
<br>
// with extended functionality, i.e. "check if const pointer arguments are uninitialized" (also performs the old check).<br>
clang -cc1 -analyze -analyzer-checker=alpha.core.CallAndMessageUnInitRefArgChecker uninit-const.cpp<br>
<b><font face="Courier New"><br>
</font></b>
<div><br>
/Per<br>
<br>
<div style="font-size:13px; font-family:Tahoma">
<p class="MsoNormal"><span style="font-size:8pt; font-family:'Arial','sans-serif'; color:gray" lang="EN-US">.......................................................................................................................</span><span style="font-size:8pt; font-family:'Arial','sans-serif'; color:black" lang="EN-US"><br>
Per Viberg </span><span style="font-size:8pt; font-family:'Arial','sans-serif'; color:gray" lang="EN-US">Senior Engineer</span><span style="font-size:8.5pt; font-family:'Arial','sans-serif'; color:gray" lang="EN-US"><br>
Evidente ES East</span><span style="font-size:8pt; font-family:'Arial','sans-serif'; color:gray" lang="EN-US"> AB  Warfvinges väg 34  SE-112 51 Stockholm  Sweden
</span><span style="font-size:10pt; font-family:'Tahoma','sans-serif'; color:black" lang="EN-US"></span></p>
<p class="MsoNormal"><span style="font-size:8pt; font-family:'Arial','sans-serif'; color:gray" lang="EN-GB">Phone:    +46 (0)8 402 79 00<br>
Mobile:    +46 (0)70 912 42 52<br>
E-mail:     <a href="mailto:Per.Viberg@evidente.se" target="_blank"><font color="#0000ff">Per.Viberg@evidente.se</font></a>
</span><span style="font-size:8pt; font-family:'Arial','sans-serif'; color:black" lang="EN-GB"><br>
<br>
<a href="http://www.evidente.se" target="_blank"><font color="#0000ff">www.evidente.se</font></a></span></p>
<p class="MsoNormal"><span style="font-size:6pt; font-family:'Arial','sans-serif'" lang="EN-GB">This e-mail, which might contain confidential information, is addressed to the above stated person/company. If you are not the correct addressee, employee or in
 any other way the person concerned, please notify the sender immediately. At the same time, please delete this e-mail and destroy any prints. Thank You.</span></p>
</div>
</div>
</div>
</body>
</html>