[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 2 05:29:35 PDT 2025
================
@@ -912,6 +931,10 @@ bool Scanner::lexPPLine(const char *&First, const char *const End) {
CurDirToks.clear();
});
+ // FIXME: Shoule we handle @import as a preprocessing directive?
----------------
yronglin wrote:
@Bigcheese I have disabled handle `@import` as a pp-directive in dependency scanner, this may cause the following thing:
https://github.com/llvm/llvm-project/blob/c945022f2fd8321559d84e2272005487c5ced924/clang/lib/Parse/Parser.cpp#L2526
Currently we try to eat a eod token in parser, This doesn't seem to make sense, the eod token should consumed in preprocessor(This eod token occurred becaused we handle @import as a pp-directive in dependency scanner, but not do the same thing in preprocessor.).
IIUC, I think we have 2 options:
1. Don't handle `@import` as a pp-directive.
2. In both dependency scanner and preprocessor LexAfterModuleImport, handle `@import` as a pp-directive.
What do you think?
Do you know where can we find the standard of objective-c? :)
https://github.com/llvm/llvm-project/pull/107168
More information about the cfe-commits
mailing list