[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

Benjamin Kramer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 05:28:49 PST 2018


bkramer added inline comments.


================
Comment at: lib/Tooling/Tooling.cpp:404
     if (CompileCommandsForFile.empty()) {
       // FIXME: There are two use cases here: doing a fuzzy
       // "find . -name '*.cc' |xargs tool" match, where as a user I don't care
----------------
ioeric wrote:
> bkramer wrote:
> > This comment explains why the implementation doesn't error. Can you make sure the xargs use case is still working properly?
> I somehow missed the big `FIXME`... thanks for the catch! 
> 
> I don't think this is a very typical use case that should affect design decision here, and I would expect `xargs` users to do something like `xargs tool $@ || true` if they really want to ignore errors. WDYT?
Yeah. I think the only important thing is that xargs doesn't stop after the first error. But that seems to be the default behavior of xargs?


Repository:
  rC Clang

https://reviews.llvm.org/D42361





More information about the cfe-commits mailing list