Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/121...@github.com>
================ @@ -6092,9 +6092,10 @@ void ASTWriter::WriteDeclUpdatesBlocks(ASTContext &Context, // An updated body is emitted last, so that the reader doesn't need // to skip over the lazy body to reach statements for other records. - if (Kind == UPD_CXX_ADDED_FUNCTION_DEFINITION) - HasUpdatedBody = true; - else if (Kind == UPD_CXX_ADDED_VAR_DEFINITION) + if (Kind == UPD_CXX_ADDED_FUNCTION_DEFINITION) { + assert(isa<FunctionDecl>(D) && "expected FunctionDecl"); + HasUpdatedBody = dyn_cast<FunctionDecl>(D)->hasBody(); + } else if (Kind == UPD_CXX_ADDED_VAR_DEFINITION) ---------------- ChuanqiXu9 wrote: ```suggestion } else if (Kind == UPD_CXX_ADDED_VAR_DEFINITION) { ``` Please see LLVM's policy for the use of `{` : https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements we hope the style is consistent with the if-else branches https://github.com/llvm/llvm-project/pull/121550 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits