ilya-biryukov added a comment.

I'll leave the LGTM to Manuel. I don't have a strong opinion here, but here are 
some thoughts.

The approach taken seems to be the least-leaky that I can think of unless we 
want to change the return type of `CompilationDatabase::getCompileCommand` or 
add a new method that would explicitly be used to infer commands. Both options 
are rather tricky to implement.
Yet, having the new field in the `CompileCommand` feels wrong, especially in 
combination with a fact that `CompilationDatabase` returns a vector of compile 
commands rather just a single command, i.e. after this patch implementations 
can technically return a combination of inferred and non-inferred commands for 
the same file, which might force clients to think about proper prioritization 
and filtering commands, something I'd rather keep hidden.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60194/new/

https://reviews.llvm.org/D60194



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to