CPlusPlus: Categorize "Find Usages" results

That is, find out whether a certain access was a read, a write, a
declaration or something else, and report the result to upper layers.
Follow-up patches can make this information visible to users.

Task-number: QTCREATORBUG-12734
Task-number: QTCREATORBUG-19373
Change-Id: Iee79e39dd1eb5a986a7e27846991e0e01b2c3a2f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2020-08-28 14:07:16 +02:00
parent 0ceb9f487c
commit 45dd074441
4 changed files with 569 additions and 16 deletions

View File

@@ -650,8 +650,9 @@ restart_search:
if (macro.name() == useMacro.name()) {
unsigned column;
const QString &lineSource = matchingLine(use.bytesBegin(), source, &column);
usages.append(CPlusPlus::Usage(fileName, lineSource, use.beginLine(), column,
useMacro.nameToQString().size()));
usages.append(CPlusPlus::Usage(fileName, lineSource,
CPlusPlus::Usage::Type::Other, use.beginLine(),
column, useMacro.nameToQString().size()));
}
}
}