[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 22:51:11 PST 2023


Endilll wrote:

@ChuanqiXu9 Can I use some of your help? This PR breaks two module tests:
```
  Clang :: Modules/cxx20-hu-04.cpp
  Clang :: Modules/cxx20-module-file-info-macros.cpp
```
Apparently I somehow break import or export of header unit macros.

In `cxx20-module-file-info-macros.cpp`, the following part of the test breaks, because there are no macro definitions in the output:
https://github.com/llvm/llvm-project/blob/e3c120a585d2740bd1a4de23112fccd82013adbc/clang/test/Modules/cxx20-module-file-info-macros.cpp#L51-L58

In `cxx20-hu-04.cpp`, the following part of the test:
https://github.com/llvm/llvm-project/blob/e3c120a585d2740bd1a4de23112fccd82013adbc/clang/test/Modules/cxx20-hu-04.cpp#L83-L94
produces some unexpected diagnostic:
```
error: 'expected-error' diagnostics expected but not seen:
  File importer-01.cpp Line 9: use of undeclared identifier 'bar'
error: 'expected-error' diagnostics seen but not expected:
  File importer-01.cpp Line 5: use of undeclared identifier 'FORTYTWO'
  File importer-01.cpp Line 9: use of undeclared identifier 'FORTYTWO'
error: 'expected-note' diagnostics expected but not seen:
  File * Line * (directive at importer-01.cpp:10): 'baz' declared here
4 errors generated.
```
which is again a missing macro definition.
Me and Aaron have been trying to debug this, but to no avail.

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


More information about the cfe-commits mailing list