forked from qt-creator/qt-creator
ClangCodeModel: Ignore built-in types
... in the semantic highlighter. The syntax highlighter already handles these. Change-Id: Ib1e80ec194021dbd2b4eca7a300db869ccddb7b0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -596,11 +596,8 @@ void ExtraHighlightingResultsCollector::collectFromNode(const ClangdAstNode &nod
|
||||
{
|
||||
if (node.kind().endsWith("Literal"))
|
||||
return;
|
||||
|
||||
if (node.role() == "type" && node.kind() == "Builtin") {
|
||||
insertResult(node, C_PRIMITIVE_TYPE);
|
||||
if (node.role() == "type" && node.kind() == "Builtin")
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_clangdVersion < 16 && node.role() == "attribute"
|
||||
&& (node.kind() == "Override" || node.kind() == "Final")) {
|
||||
|
||||
@@ -712,8 +712,6 @@ void ClangdTestHighlighting::test_data()
|
||||
QTest::newRow("function call") << 64 << 5 << 64 << 13 << QList<int>{C_FUNCTION} << 0;
|
||||
QTest::newRow("type conversion function (struct)") << 68 << 14 << 68 << 17
|
||||
<< QList<int>{C_TYPE} << 0;
|
||||
QTest::newRow("type conversion function (built-in)") << 69 << 14 << 69 << 17
|
||||
<< QList<int>{C_PRIMITIVE_TYPE} << 0;
|
||||
QTest::newRow("type reference") << 74 << 5 << 74 << 8 << QList<int>{C_TYPE} << 0;
|
||||
QTest::newRow("local variable declaration") << 79 << 9 << 79 << 12
|
||||
<< QList<int>{C_LOCAL, C_DECLARATION} << 0;
|
||||
|
||||
Reference in New Issue
Block a user