[PATCH] D60194: [Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 07:58:09 PDT 2019


sammccall added a comment.

In D60194#1454633 <https://reviews.llvm.org/D60194#1454633>, @ilya-biryukov wrote:

> 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.


I do think the vector<CompileCommand> return isn't ideal, though I'm not sure it's really related to this change - the CDB can return inferred and non-inferred commands today, and there's no guidance on which to pick.
(I was thinking of adding some, but different tools do different things e.g. pick first, or iterate over all, and I'm not sure which is best :-/)


Repository:
  rC Clang

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

https://reviews.llvm.org/D60194





More information about the cfe-commits mailing list