[analyzer] Extend IdenticalExprChecker to check logical and bitwise expressions.

Press ? to show keyboard shortcuts.
Committed
jroseFeb 19 2014, 9:44 AM
Parents
rL201701: [analyzer] Extend IdenticalExprChecker to check the two branches of an if.
Branches
Unknown
Tags
Unknown
Description

[analyzer] Extend IdenticalExprChecker to check logical and bitwise expressions.

IdenticalExprChecker now warns if any expressions in a logical or bitwise
chain (&&, ||, &, |, or ^) are the same. Unlike the previous patch, this
actually checks all subexpressions against each other (an O(N^2) operation,
but N is likely to be small).

Patch by Daniel Fahlgren!

rL201702

cfe/trunk/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp

Loading...

cfe/trunk/test/Analysis/identical-expressions.cpp

Loading...

Add Comment