baloghadamsoftware added a comment.

Hello,

This checker is an alternative approach to our not yet published 
statistics-based checkers in a way: 2019 EuroLLVM Developers’ Meeting: A. 
Balogh “Statistics Based Checkers in the Clang Static Analyzer” 
<https://www.youtube.com/watch?v=IM1DYZ-xn-k&t=112s>

There are two main differences: The first is that in the statistics-based 
Special Return Value checker we read the function names from a `YAML` file. 
There is no other way because the data was previously dynamically collected, 
but we can also add a static part to it which contains the functions hard-wired 
in your checker. I think that is a better approach.

The other, even more important difference is that in the Special Return Value 
checker we do not check explicitly whether the return value was compared to 
NULL pointer but we fork a new execution path where it is a `NULL` pointer and 
expect other checkers to report a bug on this path. I wonder which approach is 
the better one: Your approach also finds cases which our checkers can not, e.g. 
there is not enough memory for `malloc()`. However it also finds more false 
positives where the return value was left intentionally unchecked because in 
that particular case no error can happen.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72705/new/

https://reviews.llvm.org/D72705



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to