-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Frontend] Don't output skipped includes from predefines
`-H` displays a tree of included header files, but that tree is supposed to omit two categories of header files: 1. Any header files pulled in via `-include`, which the code refers to as the "predefines". 2. Any header files whose inclusion was skipped because they'd already been included (assuming header guards or `#pragma once`). `-fshow-skipped-includes` was intended to make `-H` display the second category of files. It wasn't checking for the first category, however, so you could end up with only the middle of the `-include` hierarchy displayed, e.g. the added test would previously output: ``` ... /data/users/smeenai/llvm-project/clang/test/Frontend/Inputs/test2.h . /data/users/smeenai/llvm-project/clang/test/Frontend/Inputs/test.h ``` This diff adds a check to prevent that and correctly omit headers from `-include` even when `-fshow-skipped-includes` is passed. While I'm here, add tests for the interaction between `-fshow-skipped-includes` and `-sys-header-deps` as well. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D153175
- Loading branch information
Showing
2 changed files
with
43 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters