================ @@ -18544,8 +18544,14 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, if (PrevDecl) CheckRedeclarationInModule(New, PrevDecl); - if (TUK == TagUseKind::Definition && (!SkipBody || !SkipBody->ShouldSkip)) - New->startDefinition(); + if (TUK == TagUseKind::Definition) { + if (!SkipBody || !SkipBody->ShouldSkip) { + New->startDefinition(); + } else { + New->setCompleteDefinition(); + New->demoteThisDefinitionToDeclaration(); ---------------- mizvekov wrote:
The case we were hitting on this regression was from a recent improvement implemented here: https://github.com/llvm/llvm-project/commit/2db239acd1e4cb61e8c5c55dcc4b08c7d64919b6 But this skipping of parsing of bodies is built upon much older patch: https://github.com/llvm/llvm-project/commit/d9ba224f66af76e66352dcabd52a030e382ee235 But yes, we should come here for other tag kinds as well, based on the tests added in the first commit. https://github.com/llvm/llvm-project/pull/155900 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits