-
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.
Revert "[clang] Move state out of
PreprocessorOptions
(1/n) (#86358)"
This reverts commit 407a2f2 which stopped propagating the callback to module compiles, effectively disabling dependency directive scanning for all modular dependencies. Also added a regression test.
- Loading branch information
1 parent
4ae8694
commit 2248164
Showing
9 changed files
with
67 additions
and
65 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
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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// RUN: rm -rf %t | ||
// RUN: split-file %s %t | ||
|
||
// This test checks that source files of modules undergo dependency directives | ||
// scan. If a.h would not, the scan would fail when lexing `#error`. | ||
|
||
//--- module.modulemap | ||
module A { header "a.h" } | ||
|
||
//--- a.h | ||
#error blah | ||
|
||
//--- tu.c | ||
#include "a.h" | ||
|
||
//--- cdb.json.in | ||
[{ | ||
"directory": "DIR", | ||
"file": "DIR/tu.c", | ||
"command": "clang -c DIR/tu.c -fmodules -fmodules-cache-path=DIR/cache" | ||
}] | ||
|
||
// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json | ||
// RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/deps.json |
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