]> granicus.if.org Git - clang/commit
[analyzer] handle modification of vars inside an expr with comma operator
authorPetar Jovanovic <petar.jovanovic@mips.com>
Thu, 7 Mar 2019 15:50:52 +0000 (15:50 +0000)
committerPetar Jovanovic <petar.jovanovic@mips.com>
Thu, 7 Mar 2019 15:50:52 +0000 (15:50 +0000)
commit931a426f3341d5cdbb5f8c92f7d56f7647a013f8
tree236f55310067dabae235bdc914e4e3d5deb84586
parent997080398003670def4126cfdec13a94c59af75c
[analyzer] handle modification of vars inside an expr with comma operator

We should track mutation of a variable within a comma operator expression.
Current code in ExprMutationAnalyzer does not handle it.

This will handle cases like:

(a, b) ++ < == b is modified
(a, b) = c < == b is modifed

Patch by Djordje Todorovic.

Differential Revision: https://reviews.llvm.org/D58894

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355605 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Expr.h
lib/Analysis/ExprMutationAnalyzer.cpp
unittests/Analysis/ExprMutationAnalyzerTest.cpp