[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 17 10:56:45 PDT 2025
yronglin wrote:
> > Anyhow, even without throwing CWG2947 into the mix, stuff like this is allowed:
> > ```c++
> > export module x _Pragma("GCC warning \"Hi\"");
> > ```
>
> The above is working, but the seemingly simpler case is not:
>
> ```c++
> export module x; _Pragma("GCC warning \"hi\"");
> ```
>
> Gives:
>
> ```
> <stdin>:1:18: warning: extra tokens at end of 'module' directive [-Wextra-tokens]
> 1 | export module x; _Pragma("GCC warning \"hi\"");
> | ^
> | //
> <stdin>:1:18: error: a type specifier is required for all declarations
> 1 warning and 1 error generated.
> ```
Fixed.
https://github.com/llvm/llvm-project/pull/107168
More information about the cfe-commits
mailing list