<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>
Recently a TestAfterDivZero checker was added to the static analyser (r212731).<br>
<br>
We could add many related checkers, for example:<br>
* test after null pointer dereference<br>
* test after array index out of bounds<br>
* test after dangerous/invalid function argument<br>
* ...<br>
<br>
I wonder what you think about creating generic base classes for TestAfterX checkers. Would you prefer copy/paste?<br>
<br>
I attach a proof of concept patch. It adds a include file llvm/tools/clang/include/StaticAnalyzer/Core/TestAfterChecker.h. Is that the proper path where it should be or would it be better somewhere else? There is no implementation but I should add it in llvm/tools/clang/lib/StaticAnalyzer/Core/TestAfterChecker.cpp,
shouldn't I? Do you have an opinion about the namespace usage?<br>
<br>
It might still be possible to move some more code from the checker to the base classes. The current code is work-in-progress.<br>
<br>
<div>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">
<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 tabindex="0" href="mailto:Daniel.Marjamaki@evidente.se">
Daniel.Marjamaki</a></span><a tabindex="0" href="mailto:Daniel.Marjamaki@evidente.se">@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>
</div>
</body>
</html>