[PATCH] D42785: [Analyzer] Fix a typo in `ExprEngine::VisitMemberExpr`

Henry Wong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 18:14:14 PST 2018


MTC added a comment.

In https://reviews.llvm.org/D42785#995211, @NoQ wrote:

> Ew. So it means that checker transitions are currently discarded. Great catch. I guess we don't use this functionality yet, so we can't test it, but the fix should definitely go in.


You are right, that's why I don't know how to add test for this change.

> Then, again, i'm suspecting that you may want to use `checkLocation` or `checkBind` instead of `checkPreStmt<MemberExpr>` - i doubt that there's anything special about member expressions that make them different from other sorts of bindings. And if you're tracking how a symbol is assigned to a field of the structure - well, you shouldn't, this info is already in the program state and you can retrieve it any time with `getSVal(Region)`.

Thanks for your explanation, NoQ. I discovered the problem by chance, and I'll take your advice when it comes to dealing with //`MemberExpr`//.

And I have no commit access. If you plan to commit this change, I hope you can help me commit it, thank you in advance!


Repository:
  rC Clang

https://reviews.llvm.org/D42785





More information about the cfe-commits mailing list