[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 21 09:11:30 PDT 2025
yronglin wrote:
Thanks for your review!
> The treatment of keywords should be different from that of the alternative tokens.
> ```cpp
> typedef int import;
> import extern x; // expected-error {{}}
> ```
Sorry, I don't understand here, extern is a keyword, this `import` will be treated as `kw_import`, What error we expected here?
> A user-defined string literal is not a _string-literal_:
> ```cpp
> // expected-no-diagnostics
> #define STR(X) # X
> const char *s = STR(
> import "hello"_world;
> );
> ```
Does this means we should disallow macro expansion of the header name in a import directive? https://wg21.link/P3034R1 only disallow macro expansion in a module directive.
https://github.com/llvm/llvm-project/pull/107168
More information about the cfe-commits
mailing list