forked from qt-creator/qt-creator
Clang: Fix adding snippets after opening brace
The regression was introduced by
commit 82d6d20acb
Clang: Do not show completions after comma in initializer list
This fixes ClangCodeCompletionTest::testCompleteGlobals().
Change-Id: Ic126f1e3eaed158196268e3682ff32bc02deb7b9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -168,6 +168,7 @@ void ClangCompletionContextAnalyzer::handleFunctionCall(int afterOperatorPositio
|
||||
} else {
|
||||
const int functionNameStart = startOfFunctionCall(afterOperatorPosition);
|
||||
if (functionNameStart >= 0) {
|
||||
m_addSnippets = functionNameStart == afterOperatorPosition;
|
||||
// Always pass the position right after '(' to libclang because
|
||||
// positions after the comma might be problematic if a preceding
|
||||
// argument is invalid code.
|
||||
|
||||
Reference in New Issue
Block a user