Skip to content

[cpp] Check whether path between function A and function B exists #19830

Open
@noobdoesre

Description

@noobdoesre

Hi! I'm trying to write a query that checks whether function A can call (directly or transitively) function B. I've implemented it with recursive predicate that uses Function.calls. It works, but is slow. I suspect DataFlow API can be handy but couldn't produce working query yet. I'm dealing with fairly simple cpp code that doesn't use virtual functions, doesn't use pointer arithmetic, so DataFlow might be a bit too excessive for my task. I wonder what is the most efficient way to solve this problem. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions