Changeset View
Changeset View
Standalone View
Standalone View
plugins/clang/codecompletion/context.cpp
Context not available. | |||||
1149 | 1149 | | |||
---|---|---|---|---|---|
1150 | auto found = findDeclaration(qid, ctx, m_position, isOverloadCandidate ? overloadsHandled : handled); | 1150 | auto found = findDeclaration(qid, ctx, m_position, isOverloadCandidate ? overloadsHandled : handled); | ||
1151 | 1151 | | |||
1152 | if (found && found->type<FunctionType>() == nullptr && parent.isEmpty() && !resultType.isEmpty()) { | ||||
1153 | // workaround: for multiple nameless structs with the same member. | ||||
1154 | // Check the type of the member to have at least a higher probability. | ||||
1155 | auto typeCheckedDeclaration = found; | ||||
1156 | while (typeCheckedDeclaration != nullptr && typeCheckedDeclaration->abstractType() != nullptr) { | ||||
1157 | if (typeCheckedDeclaration->abstractType()->toString() == resultType) { | ||||
1158 | found = typeCheckedDeclaration; | ||||
1159 | break; | ||||
1160 | } | ||||
1161 | typeCheckedDeclaration = findDeclaration(qid, ctx, m_position, isOverloadCandidate ? overloadsHandled : handled); | ||||
1162 | } | ||||
1163 | } | ||||
1164 | | ||||
1152 | CompletionTreeItemPointer item; | 1165 | CompletionTreeItemPointer item; | ||
1153 | if (found) { | 1166 | if (found) { | ||
1154 | // TODO: Bug in Clang: protected members from base classes not accessible in derived classes. | 1167 | // TODO: Bug in Clang: protected members from base classes not accessible in derived classes. | ||
Context not available. |