[PATCH] D23409: Make clang-tidy work with clang-cl
Zachary Turner via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 11 10:44:56 PDT 2016
zturner added inline comments.
================
Comment at: lib/Driver/Driver.cpp:93
@@ +92,3 @@
+ ArrayRef<const char *> Args) {
+ auto Default = ToolChain::getTargetAndModeFromProgramName(ProgramName);
+ StringRef DefaultMode(Default.second);
----------------
rnk wrote:
> Why not change ToolInvocation::run() to behave more like clang's main? I'd rather not do this twice, mostly for consistency with the regular driver, not because it's inefficient.
I am very inexperienced with clang's driver model, but it seems to me like putting it here is actually the *correct* way, and what clang is doing is sort of a hackish workaround for the fact that it needs to parse response files the way it does.
If someone else comes along and builds another tool based off of clang, we don't want them to have to remember to do all this every single time. Seems like the Driver should "just work", and if a particular tool (such as clang) needs to do something funky, that's on the tool.
Thoughts?
https://reviews.llvm.org/D23409
More information about the cfe-commits
mailing list