From 02a76947a5cfef26f1d17e2beba44a80b56725a6 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 29 Aug 2022 13:31:28 +0200 Subject: [PATCH] ClangCodeModel: Adapt test to upstream change Apparently, friend declarations now get the "declaration" modifier. Change-Id: I30255d9953c96f2579a3fc66232a21edf406a01a Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: David Schulz --- src/plugins/clangcodemodel/test/clangdtests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/clangcodemodel/test/clangdtests.cpp b/src/plugins/clangcodemodel/test/clangdtests.cpp index fdd6d4c3b0e..ee7b209e889 100644 --- a/src/plugins/clangcodemodel/test/clangdtests.cpp +++ b/src/plugins/clangcodemodel/test/clangdtests.cpp @@ -951,7 +951,8 @@ void ClangdTestHighlighting::test_data() QTest::newRow("call to function pointer alias") << 344 << 5 << 344 << 13 << QList{C_TYPE} << 0; QTest::newRow("friend class declaration") << 350 << 18 << 350 << 27 - << QList{C_TYPE} << 0; + << (client()->versionNumber().majorVersion() >= 16 + ? QList{C_TYPE, C_DECLARATION}: QList{C_TYPE}) << 0; QTest::newRow("friend class reference") << 351 << 34 << 351 << 43 << QList{C_TYPE} << 0; QTest::newRow("function parameter of friend class type") << 351 << 45 << 351 << 50