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

Djordje Todorovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 01:05:18 PST 2019


djtodoro added a comment.

@lebedev.ri Thanks for your comment!

> Is there any way to model this more generically?
> I.e don't duplicate every naive matcher (ignoring possible presence of , op) with an variant that does not ignore ,.
> E.g. will this handle (a,b)+=1 ?

Hmm, I am not sure if there is a place for that, since this is very specific to comma operators. Any suggestions ?
It handles the situation (`(a,b)+=1`).

> What about (a,b).callNonConstMethod(), (a,b).callConstMethod() ?

This needs to be extended to support function/method calls. I guess `ExprMutationAnalyzer::findFunctionArgMutation` requires an improvement.


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

https://reviews.llvm.org/D58894





More information about the cfe-commits mailing list