Find clang-query binary.
()
| 51 | |
| 52 | |
| 53 | def _find_clang_query() -> str: |
| 54 | """Find clang-query binary.""" |
| 55 | # System LLVM install (Windows) |
| 56 | system_path = Path("C:/Program Files/LLVM/bin/clang-query.exe") |
| 57 | if system_path.exists(): |
| 58 | return str(system_path) |
| 59 | |
| 60 | # Project cache |
| 61 | cache_path = ( |
| 62 | PROJECT_ROOT / ".cache" / "clang-tools" / "clang" / "bin" / "clang-query.exe" |
| 63 | ) |
| 64 | if cache_path.exists(): |
| 65 | return str(cache_path) |
| 66 | |
| 67 | # PATH fallback |
| 68 | found = shutil.which("clang-query") |
| 69 | if found: |
| 70 | return found |
| 71 | |
| 72 | return "" |
| 73 | |
| 74 | |
| 75 | # ============================================================================ |