MitalAshok wrote:

I think the issue is here somewhere:

https://github.com/llvm/llvm-project/blob/7088a5ed880f29129ec844c66068e8cb61ca98bf/clang/lib/Sema/SemaDecl.cpp#L8753-L8764

An incomplete struct passes `CheckC23ConstexprVarType` (which it should, 
incomplete types should fail later) so it goes on to the next check. We should 
only check `RequireLiteralType` in C++. The cast isn't failing because it's 
expecting a complete type, it's failing because it's expecting a 
`CXXRecordDecl` when we only have a C `RecordDecl`.


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

Reply via email to