feat: add include resolver, dependency graph, BFS scanner (#368)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ykiko
2026-03-28 17:40:29 +08:00
committed by GitHub
parent 46ba1e4db6
commit f8a39147a7
18 changed files with 2849 additions and 28 deletions

41
.github/workflows/benchmark.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: benchmark
on:
pull_request:
branches: [main]
jobs:
benchmark:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-pixi
- name: Build scan_benchmark
run: |
pixi run cmake-config RelWithDebInfo ON
cmake --build build/RelWithDebInfo --target scan_benchmark
- name: Clone LLVM
run: git clone --depth 1 https://github.com/llvm/llvm-project.git
- name: Generate CDB
run: |
cmake -B llvm-build -G Ninja \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_TOOLCHAIN_FILE="$(pwd)/cmake/toolchain.cmake" \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;mlir;polly;flang;bolt" \
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
llvm-project/llvm
- name: Run benchmark
run: ./build/RelWithDebInfo/bin/scan_benchmark --runs 20 llvm-build/compile_commands.json