[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 17 20:54:21 PDT 2025
https://github.com/hubert-reinterpretcast commented:
There is a separate regression in this PR. Consider:
```cpp
import <=>;
```
With this PR, we get:
```
$ clang++ importHeaderToken.cc -std=c++26 -fsyntax-only
importHeaderToken.cc:1:1: error: the import directive is ill-formed, import keyword must be immediately followed on the same line by an identifier, '<', '"', or ':',
but not '::', after being at the start of a line or preceded by an export at the start of the line
1 | import <=>;
| ^
importHeaderToken.cc:1:8: error: expected module name
1 | import <=>;
| ^
2 errors generated.
Return: 0x01:1 Wed Sep 17 23:48:22 2025 EDT
```
Without it, we get:
```
importHeaderToken.cc:1:8: fatal error: '=' file not found
1 | import <=>;
| ^~~
1 error generated.
Return: 0x01:1 Wed Sep 17 23:48:26 2025 EDT
```
https://github.com/llvm/llvm-project/pull/107168
More information about the cfe-commits
mailing list