Author: Jonas Hahnfeld Date: 2025-11-30T11:58:41+01:00 New Revision: ce2c0813f0615084f387b31715ca0e1d8377134e
URL: https://github.com/llvm/llvm-project/commit/ce2c0813f0615084f387b31715ca0e1d8377134e DIFF: https://github.com/llvm/llvm-project/commit/ce2c0813f0615084f387b31715ca0e1d8377134e.diff LOG: [clang] Move and update comment in getASTRecordLayout, NFC. isDefinition was already renamed to isCompleteDefinition by commit f937c023bf in 2011, later the day the comment was originally written. Added: Modified: clang/lib/AST/RecordLayoutBuilder.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index ac18d4da22e8c..5d8f54f111ab2 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/lib/AST/RecordLayoutBuilder.cpp @@ -3363,16 +3363,15 @@ void MicrosoftRecordLayoutBuilder::computeVtorDispSet( /// position information. const ASTRecordLayout & ASTContext::getASTRecordLayout(const RecordDecl *D) const { - // These asserts test diff erent things. A record has a definition - // as soon as we begin to parse the definition. That definition is - // not a complete definition (which is what isDefinition() tests) - // until we *finish* parsing the definition. - if (D->hasExternalLexicalStorage() && !D->getDefinition()) getExternalSource()->CompleteType(const_cast<RecordDecl*>(D)); // Complete the redecl chain (if necessary). (void)D->getMostRecentDecl(); + // These asserts test diff erent things. A record has a definition + // as soon as we begin to parse the definition. That definition is + // not a complete definition (which is what isCompleteDefinition() tests) + // until we *finish* parsing the definition. D = D->getDefinition(); assert(D && "Cannot get layout of forward declarations!"); assert(!D->isInvalidDecl() && "Cannot get layout of invalid decl!"); _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
