https://github.com/vsapsai commented:

I've realized that the test doesn't have to be Objective-C, the failure is 
reproducible in C. Curiously, we aren't hitting the assertion in 
C++/Objective-C++ but I don't know why.

I wanted to try defining the enums in different scopes (e.g. in a struct) and 
see how it works. Consequences for scopes aren't clear, so that's worth taking 
another look.

A big surprise for me was that the assertion happens in the stack trace
```
 #7 0x0000000105168664 clang::ASTWriter::WriteCUDAPragmas(clang::Sema&)
 #8 0x00000001033ea29c 
clang::ASTWriter::WriteFPPragmaOptions(clang::FPOptionsOverride const&)
 #9 0x00000001033e4e70 
clang::ASTWriter::WriteIdentifierTable(clang::Preprocessor&, 
clang::IdentifierResolver*, bool)
```

The fact that `WriteCUDAPragmas` is somehow involved while we have no CUDA 
pragmas is very suspicious.

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

Reply via email to