diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-07-05 09:37:34 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-07-10 07:56:48 +0000 |
commit | 2aa067f28e973df757b65830ba6c278ebc03e6e6 (patch) | |
tree | 6e39f864db9d535700dcdad38935da0fe2eb8384 /src | |
parent | 0d9e8d3e9de107f3ed10f961860a71659a22fb69 (diff) |
Clang: Fix adding snippets after opening brace
The regression was introduced by
commit 82d6d20acb04ec970ee609e46e4f7d9543b416f4
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/clangcodemodel/clangcompletioncontextanalyzer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/clangcompletioncontextanalyzer.cpp b/src/plugins/clangcodemodel/clangcompletioncontextanalyzer.cpp index a2c32a537a..7217b905b0 100644 --- a/src/plugins/clangcodemodel/clangcompletioncontextanalyzer.cpp +++ b/src/plugins/clangcodemodel/clangcompletioncontextanalyzer.cpp @@ -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. |