[PATCH] D58894: [analyzer] Handle modification of vars inside an expr with comma operator

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 04:50:27 PST 2019


lebedev.ri added a comment.

In D58894#1418251 <https://reviews.llvm.org/D58894#1418251>, @djtodoro wrote:

> @lebedev.ri I agree, thank you! I needed to be more precise in my previous reply, sorry for that. I thought it will be (somehow) overhead if I change existing, very basic, matchers.


I indeed don't think the existing matchers should be changed to ignore these `,` ops (or implicit casts, like some issue reports propose).

> I already implemented a static function that skips comma operands, and extended this to support member calls, functions, etc.



> But, implementing it as a new matcher sounds like better idea.

Yes. I think this matcher will be very baseline, and can just be added where needed
(with appropriate test coverage, of course), without matcher duplication like in this current diff.

> Thanks!

Thanks for working on this.


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

https://reviews.llvm.org/D58894





More information about the cfe-commits mailing list