Repository navigation
quality: msvc clang-tidy passes --driver-mode=cl after -- (part of #8733) - #9012
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8733.
When
--driver-mode=clcame in only through--extra-arg-before, clang-tidy read the flags after--in GNU mode. It took/I,/Dand/nologofor linker inputs and dropped them. Sodep.h, which is only found through/I., came back asfile not found. See LLVM #66553 and CMake #25708.quality/clang_syntax.bzl:_msvc_tidy_argvnow emitssrc -- --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_dirtyandreal_result_clang_tidy_cc_gcc_cleanpass.tools/dx check --applyon//quality:all //quality/testdata:allpassed.--affectedcould not run because the localorigin/HEADpoints to a staleorigin/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