<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
Hi all, </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
In the implementation of checker, there are three ways to determine whether <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>CallExpr is the function call specified.</div>
<div>1). 'CallDescription', used in SimpleStreamChecker, BlockInCriticalSectionChecker</div>
<div>  and ValistChecker.</div>
<div>2). 'ASTContext.Idents.get()', used in MallocChecker, StreamChecker and </div>
<div>   PointerArithChecker.</div>
<div>3). 'isCLibraryFunction() and isCPPStdLibraryFunction()', used in CStringChecker.</div>
<div><br>
</div>
<div>For 1), my understanding is that CallDescription corresponds to CallEvent. </div>
<div><br>
</div>
<div>My question is, for 2) and 3), </div>
<div>- which way is better when determining whether</div>
<div>  a function call is the specified library function? </div>
<div><br>
</div>
<div>- Should 'isCPPStdLibraryFunction()' be moved from CStringChecker.cpp to </div>
<div>  CheckerContext.cpp like 'isCLibraryFunction()'?</div>
<div><br>
</div>
<div>- If I understand correctly,'ASTContext.Idents.get()' may have false positives,</div>
<div>  for example, ASTContext.Idents.get("malloc") may match to user-defined </div>
<div>  function of the same name. Is that right?</div>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="signature">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Henry Wong</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Qihoo 360 Codesafe Team</div>
</div>
</body>
</html>