[PATCH] D103461: [clang][deps] NFC: Do not adjust the original action
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 2 04:45:31 PDT 2021
jansvoboda11 added a comment.
In D103461#2791760 <https://reviews.llvm.org/D103461#2791760>, @dexonsmith wrote:
> Is there (or could there be) a mode where `clang-scan-deps` prints out the command-lines it sends to the dependency scanning action (maybe instead of actually scanning), so this could be tested?
The command-line adjustments are an implementation detail and there's a bunch of tests checking the make output format that exercise the code. So I'm not sure there's much value in explicitly testing the transformations. There's currently no way to print the adjusted command-line.
My reason for the FIXME is that we could get rid of bunch of Windows-specific logic by adjusting `CompilerInvocation` instead.
================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:442-443
ResourceDirectoryCache ResourceDirCache;
+ // FIXME: Adjust the resulting CompilerInvocation in DependencyScanningAction
+ // instead of parsing and adjusting the raw command-line.
AdjustingCompilations->appendArgumentsAdjuster(
----------------
dexonsmith wrote:
> Nit: blank line before the comment might make it easier to read; also the second line seems to have an indent, is that intentional?
The indent is intentional, my IDE doesn't pick up unindented lines part of the FIXME. I've removed it so it's more in line with the rest of the codebase.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103461/new/
https://reviews.llvm.org/D103461
More information about the cfe-commits
mailing list