balazske added a comment.

Works relatively good now but not perfect. The tests are sometimes too strict 
so there are some false positives, for example this case:

  unsigned long X = strtoul("345", NULL, 10);
  if (X > 100) {
   // handle error
  }

The result is not checked for `ULONG_MAX` but still the code is correct in this 
way. But we can not figure out the intention of the programmer to detect what 
is an "error handling code" to check for error handling branches. Other 
solution is to detect any branch condition that involves the value (returned 
from the function) as a "test for error return value" but this is probably not 
better.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71510



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

Reply via email to