hokein added a comment. thanks!
================ Comment at: clang/lib/Sema/SemaStmt.cpp:3736 + BlockDecl *BD = CurBlock->TheDecl; + if (!BD->isInvalidDecl() && RetValExp && RetValExp->containsErrors()) + BD->setInvalidDecl(); ---------------- nit: the `isInvalidDecl` check is not need, we can inline the `RetValExpr` to the above if as well. ``` if (auto *CurBlock = dyn_cast<BlockScopeInfo>(CurCap); CurBlock && CurCap->HasImplicitReturnType && RetValExp && RetValExp->containsErrors()) CurBlock->TheDecl->setInvalidDecl(); ``` ================ Comment at: clang/test/SemaObjC/crash-on-val-dep-block-expr.m:1 +// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s +// no crash ---------------- can you move these tests to `llvm-project/clang/test/AST/ast-dump-recovery.c`? Repository: rZORG LLVM Github Zorg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155396/new/ https://reviews.llvm.org/D155396 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits