[PATCH] D23409: Make clang-tidy work with clang-cl

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 10:23:46 PDT 2016


rnk 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);
----------------
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.

================
Comment at: lib/Tooling/JSONCompilationDatabase.cpp:119
@@ -115,1 +118,3 @@
     StringRef EscapedCommandLine) {
+#if defined(LLVM_ON_WIN32)
+  llvm::BumpPtrAllocator Alloc;
----------------
It would be nice if the JSON file just told us which quoting mechanism it was using. You can imagine building the compilation database on one system and sending it off to another for indexing.

================
Comment at: lib/Tooling/JSONCompilationDatabase.cpp:127
@@ -116,2 +126,3 @@
+#else
   CommandLineArgumentParser parser(EscapedCommandLine);
   return parser.parse();
----------------
I bet we could replace this with TokenizeGNUCommandLine some other day.


https://reviews.llvm.org/D23409





More information about the cfe-commits mailing list