[all-commits] [llvm/llvm-project] 952990: [clang] Add '-ast-dump-filter=' support

Tommy Chiang via All-commits all-commits at lists.llvm.org
Mon Sep 6 19:43:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95299019e35b21a790a2f797bede1af98d84fcb5
      https://github.com/llvm/llvm-project/commit/95299019e35b21a790a2f797bede1af98d84fcb5
  Author: oToToT <ty1208chiang at gmail.com>
  Date:   2021-09-07 (Tue, 07 Sep 2021)

  Changed paths:
    M clang/include/clang/Driver/Options.td

  Log Message:
  -----------
  [clang] Add '-ast-dump-filter=' support

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 confiused when they found they can't use `ast-dump-filter` with
clang.




More information about the All-commits mailing list