File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments