[PATCH] D34440: [Clang] Expand response files before loading compilation database

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 18 07:27:16 PDT 2017


klimek added a comment.

In https://reviews.llvm.org/D34440#812938, @vladimir.plyashkun wrote:

> > If you want one unified format, the compilation database is it.
>
> Is the `clang-tidy ... -- <args>` meant to be more or less a drop-in replacement for `clang <args>` (arguments-wise)? 
>  If yes, this expansion of response files here is an another step in this direction.


Yes. I'm still confused why in this case
clang-tidy @file -- 
would be expected to expand the response file? Am I missing something?

> Our only concerns are the internal ones (instead of using our well-tested response file implementation, we have to do something similar but different with JSON-based compilation database format). 
>  Obviously, it is possible to use it, and if this patch won't be accepted, we would.

I don't understand this. Can you elaborate?

> But then, again, I see this change as a positive by itself and don't really understand why the compiler driver should expand response arguments and the fixed compilation database shouldn't.
> 
> As IDE developers we don't have full control on the format of compiler options. 
>  They come from users in free form which compiler can understand.
>  From the implementation view it would be more transparent and efficient to transfer them in the original form to Clang-Tidy (instead of generating intermediate files).

Why are intermediate files (or your own implementation of a CompilationDatabase) not in the "original form". What *is* the original form?


Repository:
  rL LLVM

https://reviews.llvm.org/D34440





More information about the cfe-commits mailing list