Skip to content

[clang-query] Tab autocompletion misses matchers like hasUnqualifiedDesugaredType() #106663

Open
@MichelleCDjunaidi

Description

@MichelleCDjunaidi

The following is a valid clang-query command:
match declaratorDecl(hasType(hasUnqualifiedDesugaredType(recordType(hasDeclaration(namedDecl(hasName("::std::thread")))))))

However, when tabbing on the open brace of
match declaratorDecl(hasType()),
only the following options are provided:

Matcher<Decl> accessSpecDecl(Matcher<AccessSpecDecl>...)
Matcher<QualType|Decl> anything()
Matcher<QualType> asString(string)
Matcher<Decl> bindingDecl(Matcher<BindingDecl>...)
Matcher<Decl> blockDecl(Matcher<BlockDecl>...)
Matcher<Decl> classTemplateDecl(Matcher<ClassTemplateDecl>...)
Matcher<Decl> classTemplatePartialSpecializationDecl(Matcher<ClassTemplatePartialSpecializationDecl>...)
Matcher<Decl> classTemplateSpecializationDecl(Matcher<ClassTemplateSpecializationDecl>...)
Matcher<Decl> conceptDecl(Matcher<ConceptDecl>...)
Matcher<Decl> cxxConstructorDecl(Matcher<CXXConstructorDecl>...)
Matcher<Decl> cxxConversionDecl(Matcher<CXXConversionDecl>...)
Matcher<Decl> cxxDeductionGuideDecl(Matcher<CXXDeductionGuideDecl>...)
Matcher<Decl> cxxDestructorDecl(Matcher<CXXDestructorDecl>...)
Matcher<Decl> cxxMethodDecl(Matcher<CXXMethodDecl>...)
Matcher<Decl> cxxRecordDecl(Matcher<CXXRecordDecl>...)
Matcher<Decl> decl(Matcher<Decl>...)
Matcher<Decl> declaratorDecl(Matcher<DeclaratorDecl>...)
Matcher<Decl> decompositionDecl(Matcher<DecompositionDecl>...)
Matcher<Decl> enumConstantDecl(Matcher<EnumConstantDecl>...)
Matcher<Decl> enumDecl(Matcher<EnumDecl>...)
Matcher<QualType|Decl> equalsBoundNode(string|string)
Matcher<Decl> fieldDecl(Matcher<FieldDecl>...)
Matcher<QualType|Decl> forEach(Matcher<NestedNameSpecifierLoc|QualType|TypeLoc|...>)
Matcher<QualType|Decl> forEachDescendant(Matcher<NestedNameSpecifierLoc|QualType|TypeLoc|...>)
Matcher<Decl> friendDecl(Matcher<FriendDecl>...)
Matcher<Decl> functionDecl(Matcher<FunctionDecl>...)
Matcher<Decl> functionTemplateDecl(Matcher<FunctionTemplateDecl>...)
Matcher<QualType|Decl> has(Matcher<NestedNameSpecifierLoc|QualType|TypeLoc|...>)
Matcher<Decl> hasAncestor(Matcher<NestedNameSpecifierLoc|TypeLoc|Decl|...>)
Matcher<Decl> hasAttr(string)
Matcher<QualType> hasCanonicalType(Matcher<QualType>)
Matcher<Decl> hasDeclContext(Matcher<Decl>)
Matcher<QualType> hasDeclaration(Matcher<Decl>)
Matcher<QualType|Decl> hasDescendant(Matcher<NestedNameSpecifierLoc|QualType|TypeLoc|...>)
Matcher<QualType> hasLocalQualifiers()
Matcher<Decl> hasParent(Matcher<NestedNameSpecifierLoc|TypeLoc|Decl|...>)
Matcher<QualType> ignoringParens(Matcher<QualType>)
Matcher<Decl> indirectFieldDecl(Matcher<IndirectFieldDecl>...)
Matcher<QualType> isAnyCharacter()
Matcher<QualType> isAnyPointer()
Matcher<QualType> isConstQualified()
Matcher<Decl> isExpandedFromMacro(string)
Matcher<Decl> isExpansionInFileMatching(string...)
Matcher<Decl> isExpansionInMainFile()
Matcher<Decl> isExpansionInSystemHeader()
Matcher<Decl> isImplicit()
Matcher<Decl> isInAnonymousNamespace()
Matcher<Decl> isInStdNamespace()
Matcher<Decl> isInstantiated()
Matcher<QualType> isInteger()
Matcher<Decl> isPrivate()
Matcher<Decl> isProtected()
Matcher<Decl> isPublic()
Matcher<QualType> isSignedInteger()
Matcher<QualType> isUnsignedInteger()
Matcher<QualType> isVolatileQualified()
Matcher<Decl> labelDecl(Matcher<LabelDecl>...)
Matcher<Decl> linkageSpecDecl(Matcher<LinkageSpecDecl>...)
Matcher<Decl> namedDecl(Matcher<NamedDecl>...)
Matcher<Decl> namespaceAliasDecl(Matcher<NamespaceAliasDecl>...)
Matcher<Decl> namespaceDecl(Matcher<NamespaceDecl>...)
Matcher<Decl> nonTypeTemplateParmDecl(Matcher<NonTypeTemplateParmDecl>...)
Matcher<Decl> objcCategoryDecl(Matcher<ObjCCategoryDecl>...)
Matcher<Decl> objcCategoryImplDecl(Matcher<ObjCCategoryImplDecl>...)
Matcher<Decl> objcImplementationDecl(Matcher<ObjCImplementationDecl>...)
Matcher<Decl> objcInterfaceDecl(Matcher<ObjCInterfaceDecl>...)
Matcher<Decl> objcIvarDecl(Matcher<ObjCIvarDecl>...)
Matcher<Decl> objcMethodDecl(Matcher<ObjCMethodDecl>...)
Matcher<Decl> objcPropertyDecl(Matcher<ObjCPropertyDecl>...)
Matcher<Decl> objcProtocolDecl(Matcher<ObjCProtocolDecl>...)
Matcher<Decl> parmVarDecl(Matcher<ParmVarDecl>...)
Matcher<QualType> pointsTo(Matcher<QualType|Decl>)
Matcher<QualType> qualType(Matcher<QualType>...)
Matcher<Decl> recordDecl(Matcher<RecordDecl>...)
Matcher<QualType> references(Matcher<QualType|Decl>)
Matcher<Decl> staticAssertDecl(Matcher<StaticAssertDecl>...)
Matcher<Decl> tagDecl(Matcher<TagDecl>...)
Matcher<Decl> templateTemplateParmDecl(Matcher<TemplateTemplateParmDecl>...)
Matcher<Decl> templateTypeParmDecl(Matcher<TemplateTypeParmDecl>...)
Matcher<Decl> translationUnitDecl(Matcher<TranslationUnitDecl>...)
Matcher<Decl> typeAliasDecl(Matcher<TypeAliasDecl>...)
Matcher<Decl> typeAliasTemplateDecl(Matcher<TypeAliasTemplateDecl>...)
Matcher<Decl> typedefDecl(Matcher<TypedefDecl>...)
Matcher<Decl> typedefNameDecl(Matcher<TypedefNameDecl>...)
Matcher<Decl> unresolvedUsingTypenameDecl(Matcher<UnresolvedUsingTypenameDecl>...)
Matcher<Decl> unresolvedUsingValueDecl(Matcher<UnresolvedUsingValueDecl>...)
Matcher<Decl> usingDecl(Matcher<UsingDecl>...)
Matcher<Decl> usingDirectiveDecl(Matcher<UsingDirectiveDecl>...)
Matcher<Decl> usingEnumDecl(Matcher<UsingEnumDecl>...)
Matcher<Decl> valueDecl(Matcher<ValueDecl>...)
Matcher<Decl> varDecl(Matcher<VarDecl>...)
Matcher<T> allOf(Matcher<T>...)
Matcher<T> anyOf(Matcher<T>...)
Matcher<Stmt> binaryOperation(Matcher<QualType|Decl>...)
Matcher<T> eachOf(Matcher<T>...)
Matcher<Stmt> invocation(Matcher<QualType|Decl>...)
Matcher<QualType|Decl> mapAnyOf(QualType|Decl...)
Matcher<T> optionally(Matcher<T>...)
Matcher<T> unless(Matcher<T>...)

Which doesn't contain hasUnqualifiedDesugaredType(). This seems like an unintended mismatch, unless it has been made clear that the tab autocomplete function only offers a subset of possible matches?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions