Skip to content
Snippets Groups Projects
Commit 0145a3de authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Look at the signed/unsigned specifiers when checking function return types.

parent aed481de
No related branches found
No related tags found
No related merge requests found
......@@ -966,8 +966,10 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item)
if (Function *function = symbol->type()->asFunction()) {
// If the member is a function, automatically place the opening parenthesis,
// except when it might take template parameters.
if (!function->returnType().isValid()
&& (function->identity() && !function->identity()->isDestructorNameId())) {
const bool hasReturnType = function->returnType().isValid() ||
function->returnType().isSigned() ||
function->returnType().isUnsigned();
if (! hasReturnType && (function->identity() && !function->identity()->isDestructorNameId())) {
// Don't insert any magic, since the user might have just wanted to select the class
} else if (function->templateParameterCount() != 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment