[PATCH] D52857: Deprecate 'set output foo' API of clang-query

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 9 13:11:17 PDT 2018


aaron.ballman added a comment.

In https://reviews.llvm.org/D52857#1258893, @steveire wrote:

> - The scripts will continue to work at least until `set output` is removed, which is not going to happen soon.


Certainly, but given that deprecation implies eventual removal, people are still being asked to update their scripts. What's more, given that clang-output has no real documentation to speak of, how will users even *know* to update their scripts? Rather than invent ways to address these concerns, I'm much more in favor of making the feature work using a backwards compatible syntax. Then no one has to update their scripts to get identical functionality.

> - A comma-delimited list of options means that if I have `foo, bar, bat`  enabled and want to add `bang`, I need to `set output foo, bar, bat, bang`. Or alternatively if I want to remove `bat`, I need to write out all the others. I don't think that's suitable.

Correct -- if you want different output because new options are available, you need to opt into it. I'm not certain what the issue is with that; can you expound on your concerns? From what I'm seeing in the patch, it looks like you want user to write:

  set dump-output
  set diag-output
  match foo(bar(baz()))

and I'm asking for it to instead be:

  set output dump, diag
  match foo(bar(baz()))

Functionally, I believe these are equivalent. However, I think the latter is more clear for users as it implies a set of output options rather than leaving you to wonder whether `set blah-output` options are mutually exclusive or not.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52857





More information about the cfe-commits mailing list