forked from qt-creator/qt-creator
Clang: Fallback to global completion if function call completion fails
We can not offer proper constructor completion with libclang <= 3.6, so fall back to normal/global completion. Change-Id: I90bb8d981ae20ed4c228f829ad4267221b92f8a1 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -874,6 +874,15 @@ void ClangCodeCompletionTest::testCompleteFunctions()
|
||||
QVERIFY(hasItem(t.proposal, "TType<QString> f(bool)"));
|
||||
}
|
||||
|
||||
void ClangCodeCompletionTest::testCompleteConstructorAndFallbackToGlobalCompletion()
|
||||
{
|
||||
ProjectLessCompletionTest t("constructorCompletion.cpp");
|
||||
|
||||
QVERIFY(hasItem(t.proposal, "globalVariable"));
|
||||
QVERIFY(hasItem(t.proposal, "GlobalClassWithCustomConstructor"));
|
||||
QVERIFY(!hasSnippet(t.proposal, "class"));
|
||||
}
|
||||
|
||||
void ClangCodeCompletionTest::testProjectDependentCompletion()
|
||||
{
|
||||
const TestDocument testDocument("completionWithProject.cpp");
|
||||
|
||||
Reference in New Issue
Block a user