[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 05:17:30 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:
> @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)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45679





More information about the cfe-commits mailing list