CPlusPlus: Correctly categorize post-increment and -decrement accesses

Change-Id: Id21c13ea58f6747c226d91aff2b00c3409faa880
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Christian Kandeler
2020-11-04 14:13:16 +01:00
parent a88266798f
commit de1e12f3af
2 changed files with 10 additions and 2 deletions

View File

@@ -375,6 +375,8 @@ Usage::Type FindUsages::getType(int line, int column, int tokenIndex)
return Usage::Type::Read;
}
}
if (const auto postIncrDecrOp = (*it)->asPostIncrDecr())
return checkPotentialWrite(Usage::Type::Write, it + 1);
if (const auto declaratorId = (*it)->asDeclaratorId()) {
// We don't want to classify constructors and destructors as declarations
// when listing class usages.