teach loplugin unusedenumconstants about CXXOperatorCallExpr
fixes some false+ in the write-only analysis Change-Id: Ie7905c05c8012820c640064d451b33badb04c5fc
This commit is contained in:
@@ -164,6 +164,13 @@ try_again:
|
|||||||
} else {
|
} else {
|
||||||
bRead = true;
|
bRead = true;
|
||||||
}
|
}
|
||||||
|
} else if (const CXXOperatorCallExpr * operatorCall = dyn_cast<CXXOperatorCallExpr>(parent))
|
||||||
|
{
|
||||||
|
if (operatorCall->isAssignmentOp()) {
|
||||||
|
bWrite = true;
|
||||||
|
} else {
|
||||||
|
bRead = true;
|
||||||
|
}
|
||||||
} else if (isa<CastExpr>(parent) || isa<UnaryOperator>(parent)
|
} else if (isa<CastExpr>(parent) || isa<UnaryOperator>(parent)
|
||||||
|| isa<ConditionalOperator>(parent) || isa<ParenExpr>(parent)
|
|| isa<ConditionalOperator>(parent) || isa<ParenExpr>(parent)
|
||||||
|| isa<MaterializeTemporaryExpr>(parent)
|
|| isa<MaterializeTemporaryExpr>(parent)
|
||||||
|
Reference in New Issue
Block a user