[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 10 07:15:01 PDT 2018


lebedev.ri added inline comments.


================
Comment at: clang-tidy/utils/ExprMutationAnalyzer.h:38
+  const Stmt *findDeclMutation(ArrayRef<ast_matchers::BoundNodes> Matches);
+  const Stmt *findDeclMutation(const Decl *Dec);
+
----------------
lebedev.ri wrote:
> lebedev.ri wrote:
> > @shuaiwang, @JonasToth hi.
> > Is it very intentional that this `findDeclMutation()` is private?
> > 
> > Is there some other way i should be doing if i have a statement `S`,
> > a declRefExpr `D`, and i want to find the statement `Q`, which mutates
> > the underlying variable to which the declRefExpr `D` refers?
> (the statement `Q` within the statement `S`, of course)
@shuaiwang after a disscussion about this in IRC with @JonasToth, i have filed https://bugs.llvm.org/show_bug.cgi?id=38888
But i'm failing to CC you there. Are you not registered in the bugzilla?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45679





More information about the cfe-commits mailing list