Skip to content

Commit cefbcf0

Browse files
Move comment above
1 parent 3e2c300 commit cefbcf0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7230,8 +7230,9 @@ void ASTWriter::CompletedImplicitDefinition(const FunctionDecl *D) {
72307230
if (!D->isFromASTFile())
72317231
return; // Declaration not imported from PCH.
72327232

7233+
// The function definition may not have a body due to parsing errors.
72337234
if (!D->doesThisDeclarationHaveABody())
7234-
return; // The function definition may not have a body due to parsing errors.
7235+
return;
72357236

72367237
// Implicit function decl from a PCH was defined.
72377238
DeclUpdates[D].push_back(DeclUpdate(UPD_CXX_ADDED_FUNCTION_DEFINITION));
@@ -7251,8 +7252,10 @@ void ASTWriter::FunctionDefinitionInstantiated(const FunctionDecl *D) {
72517252
assert(!WritingAST && "Already writing the AST!");
72527253
if (!D->isFromASTFile())
72537254
return;
7255+
7256+
// The function definition may not have a body due to parsing errors.
72547257
if (!D->doesThisDeclarationHaveABody())
7255-
return; // The function definition may not have a body due to parsing errors.
7258+
return;
72567259

72577260
DeclUpdates[D].push_back(DeclUpdate(UPD_CXX_ADDED_FUNCTION_DEFINITION));
72587261
}

0 commit comments

Comments
 (0)