NoQ added a comment.

The patch seems correct, but i suspect that your overall approach to the 
checker you're trying to make is not ideal. `offsetof` returns a concrete value 
(because, well, symbolic `offsetof`s are not yet supported in the analyzer), 
and even if you see the concrete value, you'd be unable to track it, because 
when you get another concrete value with the same integer inside, you won't be 
able to easily figure out if its the same value or a different value. My 
intuition suggests that this checker shouldn't be path-sensitive; our 
path-sensitive analysis does very little to help you with this particular 
checker, and you might end up with a much easier and more reliable checker if 
you turn it into a simple AST visitor or an AST matcher. Just a heads up.


Repository:
  rC Clang

https://reviews.llvm.org/D42300



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

Reply via email to