Skip to content

quality: msvc clang-tidy passes --driver-mode=cl after -- (part of #8733) - #9012

Merged
TrapsterDK merged 1 commit into
mainfrom
msvc-tidy-driver-mode-8733
Nov 7, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
msvc-tidy-driver-mode-8733

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Part of #8733.

When --driver-mode=cl came in only through --extra-arg-before, clang-tidy read the flags after -- in GNU mode. It took /I, /D and /nologo for linker inputs and dropped them. So dep.h, which is only found through /I., came back as file not found. See LLVM #66553 and CMake #25708.

  • quality/clang_syntax.bzl: _msvc_tidy_argv now emits src -- --driver-mode=cl [--target=...] flags.... The non-msvc and CUDA paths are unchanged.
  • quality/clang_syntax_tests.bzl: updated the expected msvc argv.
  • quality/testdata/real_result_check.sh: when an absent string is found, the checker now prints the matching lines from each result file.

Local (Linux): //quality:clang_syntax_unit, //quality/testdata:real_result_check_spaces_test, real_result_clang_tidy_cc_dirty and real_result_clang_tidy_cc_gcc_clean pass. tools/dx check --apply on //quality:all //quality/testdata:all passed. --affected could not run because the local origin/HEAD points to a stale origin/master. No nested-Bazel or consumer tests were run.

Windows msvc evidence (real_result_clang_tidy_cc_msvc_{dirty,clean}, --//cc/toolchains:compiler=msvc): run 42329489267, pending.

Remaining for #8733: a green result from that run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hzpb4qWNZKpDCrwUz7

…8733)

clang-tidy strips /-flags from the compile command when driver mode only
arrives via --extra-arg-before, dropping /I and /D. Put --driver-mode=cl
and --target first after --. The real_result checker now prints matching
lines when an absent string is found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzpb4qWNZKpDCrwUz7
@TrapsterDK
TrapsterDK merged commit 5a990d2 into main Nov 7, 2026
1 check passed
@TrapsterDK
TrapsterDK deleted the msvc-tidy-driver-mode-8733 branch November 7, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant