[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D100762#2707823 , @arichardson wrote: > In D100762#2707812 , @jansvoboda11 > wrote: > >> If `-ast-dump=json` was a driver flag, it would be trivial to pass >> `-ast-dump -ast-d

[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-22 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D100762#2707812 , @jansvoboda11 wrote: > If `-ast-dump=json` was a driver flag, it would be trivial to pass `-ast-dump > -ast-dump-format json` to -cc1 instead. However, aliasing a single option to > two options within t

[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 planned changes to this revision. jansvoboda11 added a comment. If `-ast-dump=json` was a driver flag, it would be trivial to pass `-ast-dump -ast-dump-format json` to -cc1 instead. However, aliasing a single option to two options within the -cc1 argument parser isn't possible at th

[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D100762#2699350 , @dexonsmith wrote: > In D100762#2699252 , @arichardson > wrote: > >> I'm not sure it's a good idea to remove the `-ast-dump=json` option. While >> this is -cc

[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D100762#2699252 , @arichardson wrote: > I'm not sure it's a good idea to remove the `-ast-dump=json` option. While > this is -cc1 option, there do seem to be external consumers based on a quick > search for "-ast-dump=jso

[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson requested changes to this revision. arichardson added a reviewer: aaron.ballman. arichardson added a comment. I'm not sure it's a good idea to remove the `-ast-dump=json` option. While this is -cc1 option, there do seem to be external consumers based on a quick search for "-ast-dump=

[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added inline comments. This revision now requires changes to proceed. Comment at: clang/test/AST/ast-dump-comment-json.cpp:44 // CHECK-NEXT: "loc": { -// CHECK-NEXT: "offset": 72, +// CHECK-NEXT: "offset": 89, // CH

[PATCH] D100762: [clang][cli] Extract AST dump format into extra option

2021-04-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arichardson. Herald added subscribers: dang, usaxena95, kadircet, arphaman. jansvoboda11 requested review of this revision. Herald added projects: clang, LLVM, clang-tools-extra. Herald added subscribers: llvm-