Hi clang,<br><br>Now in UncheckedReturnValue checker we check whether some functions drop privileges successfully. It's the most critical case of UncheckedReturnValue. But it seems that UncheckedReturnValue checker should check many other cases. For example, the return values of "malloc", "pthread_mutex_lock".<br>


<br>And there may be another aspect that UncheckedReturnValue checker should check. In user defined function, there are some that their return value should always be checked, but we can't figure out whether a return value should be checked without user specification. So here is a proposal for statistic UncheckedReturnValue checker: when most(e.g. 85%) return values of a function are checked, this checker flags the unchecked return values as defects.<br>
<br>For the second part, IMO we may need some thing like a simple symbol table to store how may return values of a function are checked and also the reference loc(is there any structure i can use, or i should store this in GDM? ). And then do the check and bug report in VisitEndAnalysis.<br>
<br>How does these sounds?<br><br>-- <br>Best regards!<br><br>Lei Zhang<br>