dkrupp requested changes to this revision.
dkrupp added a comment.
This revision now requires changes to proceed.

Since the analyzer cannot cannot model the size of the containers just yet (as 
I believe this is the case now), what we are saying with this checker is to 
"always check the return value of the erase() function before use (for 
increment/decrement etc.) whether it is not past-end" .
Adam, are you sure that the user would like to enforce such a generic coding 
rule? Depending on the actual code analyzed, this would require this clumsy 
check at potentially too many places.

Wouldn't it be better to wait for the container size modeling patch? Then the 
user would only get a warning when we are sure that we are erasing the last 
element of the container.

In general I think we should keep the number of config parameters to a minimum 
as it is very hard to explain to the users which one to configure to what value 
and why.


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

https://reviews.llvm.org/D77150



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

Reply via email to