ClangCodeModel: Forward to the built-in code model

... if the user tries to complete inside a comment or string.

Fixes: QTCREATORBUG-20828
Change-Id: I245e1bd16acaf696601cabe33f27210da21cc12a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Kandeler
2023-10-17 10:34:57 +02:00
parent 57a485b9e7
commit d16d1718f3
8 changed files with 24 additions and 44 deletions

View File

@@ -1500,7 +1500,7 @@ ClangdTestCompletion::ClangdTestCompletion()
setProjectFileName("completion.pro");
setSourceFileNames({"completionWithProject.cpp", "constructorCompletion.cpp",
"classAndConstructorCompletion.cpp", "dotToArrowCorrection.cpp",
"doxygenKeywordsCompletion.cpp", "functionAddress.cpp",
"functionAddress.cpp",
"functionCompletion.cpp", "functionCompletionFiltered2.cpp",
"functionCompletionFiltered.cpp", "globalCompletion.cpp",
"includeDirectiveCompletion.cpp", "mainwindow.cpp",
@@ -1518,18 +1518,6 @@ void ClangdTestCompletion::initTestCase()
startCollectingHighlightingInfo();
}
void ClangdTestCompletion::testCompleteDoxygenKeywords()
{
ProposalModelPtr proposal;
getProposal("doxygenKeywordsCompletion.cpp", proposal);
QVERIFY(proposal);
QVERIFY(hasItem(proposal, "brief"));
QVERIFY(hasItem(proposal, "param"));
QVERIFY(hasItem(proposal, "return"));
QVERIFY(!hasSnippet(proposal, "class "));
}
void ClangdTestCompletion::testCompletePreprocessorKeywords()
{
ProposalModelPtr proposal;