matts1 wrote:

I have a repro, but it may be addressing the symptoms rather than the root 
cause.

AFAICT, a macro should *always* have an associated module (not sure how the 
implementation works without modules though).

However, the root cause of the issue appears to be that in the example I 
provided with the test case, the `ModuleMacro` constructor is called with 
`OwningModule` set to null. I'm not familiar enough with the code, however, to 
say if that's working as intended. I'm hoping someone more knowledgable than me 
could answer that.

https://github.com/llvm/llvm-project/blob/6abe19ac587d36edf202830cbbceecfd1a55f191/clang/include/clang/Lex/MacroInfo.h#L532

I'm happy to submit this as is, since a header guard can't hurt, but it may 
just hide the problem.

https://github.com/llvm/llvm-project/pull/130712
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to