* @return Whether the declaration represented by identifier @p identifier qualifies as "special" completion result * * "Special" completion results are items that are likely not regularly used. * * Examples: * - 'SomeClass::operator=(const SomeClass&)' */
| 655 | * - 'SomeClass::operator=(const SomeClass&)' |
| 656 | */ |
| 657 | bool isValidSpecialCompletionIdentifier(const QualifiedIdentifier& identifier) |
| 658 | { |
| 659 | if (identifier.count() < 2) { |
| 660 | return false; |
| 661 | } |
| 662 | |
| 663 | const Identifier id = identifier.last(); |
| 664 | const QString idString = id.toString(); |
| 665 | if (idString.startsWith(QLatin1String("operator="))) { |
| 666 | return true; // is assignment operator |
| 667 | } |
| 668 | return false; |
| 669 | } |
| 670 | |
| 671 | Declaration* findDeclaration(const QualifiedIdentifier& qid, const DUContextPointer& ctx, const CursorInRevision& position, QSet<Declaration*>& handled) |
| 672 | { |
no test coverage detected