[clang] [clang] Fix incorrect uses header-name lexing rules when #include is followed by an empty macro expansion (PR #225451)

Yihan Wang via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 6 08:13:41 PDT 2026


================

----------------
yronglin wrote:

The diagnose would be:

```
./main.cpp:10:14: warning: extra tokens after semicolon in 'import' directive [-Wextra-tokens]
   10 | import EMPTY "foo.h";
      |              ^
      |              //
```

IIUC, `EMPTY` would be traited as a identifier. But IMO, this look wired.

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


More information about the cfe-commits mailing list