llvm / llvm/llvm-project

Feature request: -ast-dump-filter for file paths

Open
#194,210 6 comments 0 reactions 0 assignees View on GitHub
clang:frontend
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

We're currently using Clang's -ast-dump to extract some information out of our headers. If the STL headers get included, this is hundreds of MiBs of JSON data. But we only care about the declarations from our own files, not the system headers.

I saw there is a -ast-dump-filter flag, but that assumes we already know the symbol names we want. Could there be a version of -ast-dump-filter that instead takes a file pattern for where the decl comes from?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Clang's existing -ast-dump-filter behavior and the AST-dump command path, then determine how declaration source paths and file patterns should be matched. Done means a file-pattern form can limit dumped declarations to the requested project files while avoiding system-header output, with coverage for the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.