This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add '-ast-dump-filter=' support
ClosedPublic

Authored by oToToT on Aug 26 2021, 4:05 AM.

Details

Summary

Before this patch, we only support syntax like
clang -cc1 -ast-dump -ast-dump-filter main a.c
or
clang -Xclang -ast-dump -Xclang -ast-dump-filter -Xclang main a.c
when using ast-dump-filter.

It is helpful to also support -ast-dump-filter= syntax, so we can do something like
clang -cc1 -ast-dump -ast-dump-filter=main a.c
or
clang -Xclang -ast-dump -Xclang -ast-dump-filter=main a.c

It is more cleaner when passing arguments through -Xclang in this case.

Also, clang-check do support this syntax, and I think people might be confused when they found they can't use -ast-dump-filter with clang.

Diff Detail

Event Timeline

oToToT created this revision.Aug 26 2021, 4:05 AM
oToToT requested review of this revision.Aug 26 2021, 4:05 AM
dblaikie accepted this revision.Sep 6 2021, 2:47 PM
dblaikie added a subscriber: dblaikie.

Sure, sounds OK!

This revision is now accepted and ready to land.Sep 6 2021, 2:47 PM