[cpp] Check whether path between function A and function B exists
未關閉
question
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 18 小時
- 30 天內合併 PR
- 152
描述
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!
貢獻指南
研究方向
未指定任何 repository 檔案或測試。首先使用 `Function.calls` 和可用的 DataFlow API 進入點檢查遞迴謂詞;當針對所述非虛擬 C++ 情況識別並記錄出一種有效率的直接呼叫或傳遞呼叫檢查方法時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- cpp
- 領域
- tooling
- Issue 類型
- 文件
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 20/100