[clang] [C++][Modules] Don't check '<' after 'import' when converting import pp-token to contextual keyword (PR #191004)

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 13:43:10 PDT 2026


================
@@ -1394,7 +1394,7 @@ bool Preprocessor::HandleModuleContextualKeyword(Token &Result) {
     LookUpIdentifierInfo(*NextTok);
 
   if (Result.getIdentifierInfo()->isImportKeyword()) {
-    if (NextTok->isOneOf(tok::identifier, tok::less, tok::colon,
+    if (NextTok->isOneOf(tok::identifier, tok::colon,
----------------
hubert-reinterpretcast wrote:

I think the `<` check is still needed?

```cpp
export module M;
#define PLATFORM_API unistd.h>
import <PLATFORM_API;  // OK
```

https://github.com/llvm/llvm-project/pull/191004


More information about the cfe-commits mailing list