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

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 10:33:13 PDT 2016

zturner added inline comments.

Comment at: lib/Tooling/JSONCompilationDatabase.cpp:119
@@ -115,1 +118,3 @@
     StringRef EscapedCommandLine) {
+#if defined(LLVM_ON_WIN32)
+  llvm::BumpPtrAllocator Alloc;
rnk wrote:
> 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.
Correct me if I've got this wrong but:

1. If you had a compile command database generated on non-Windows, and you used it on Windows, then it would necessarily be referring to something other than clang-cl right?  In which case, we don't support running clang in non-cl mode on Windows.

2. If you had a compile command database generated on Windows, then the only supported configuration would involve clang-cl, in which case you couldn't use it on non-Windows.

Is there a supported use case where a non-Windows compile database would be used on Windows or vice versa?


More information about the cfe-commits mailing list