george.karpenkov added a comment.

@trixirt I wrote a bunch of comments inline, but then after looking at the test 
cases,
.... this would not work.

This is a dataflow, all-paths check (the variable can NEVER be a nullptr), yet 
symbolic execution runs on A given paths.

Currently in the analyzer there's no way to write dataflow checks using the 
checker API.

HOWEVER, in your case all comparisons to NULL are constants, so this should be 
just implemented as an AST matcher (a good introduction is 
https://eli.thegreenplace.net/2014/07/29/ast-matchers-and-clang-refactoring-tools).
The good thing it probably could be expressed in just a few lines of code.


Repository:
  rC Clang

https://reviews.llvm.org/D47554



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

Reply via email to