================ @@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); + OwnedTagDecl->setCompleteDefinition(false); + OwnedTagDecl->setInvalidDecl(); + OwnedTagDecl->setCompleteDefinition(); ---------------- shafik wrote:
I am little uncomfortable with this change here, I see that you are calling `setCompleteDefinition(false)` in order to get around the `assert` that the decl is not complete in `Decl::setInvalidDecl(...)`. If this precondition is not true we need to understand why it break down or if this implies we should be handling this differently. https://github.com/llvm/llvm-project/pull/87173 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits