aaron.ballman added a reviewer: hokein. aaron.ballman added a subscriber: rjmccall. aaron.ballman added inline comments.
================ Comment at: clang/include/clang/AST/ComputeDependence.h:134 ExprDependence computeDependence(ExtVectorElementExpr *E); -ExprDependence computeDependence(BlockExpr *E); +ExprDependence computeDependence(BlockExpr *E, bool ContainsError); ExprDependence computeDependence(AsTypeExpr *E); ---------------- This doesn't seem like the correct fix, to me -- I would have expected the expression itself to track whether it contains errors, so you wouldn't need to pass in extra information about that. ================ Comment at: clang/lib/Sema/SemaExpr.cpp:16749-16753 + bool ContainsError = llvm::any_of(BSI->Returns, [](const ReturnStmt *Return) { + const auto *RetValExpr = Return->getRetValue(); + return RetValExpr && RetValExpr->containsErrors(); + }); + BlockExpr *Result = new (Context) BlockExpr(BD, BlockTy, ContainsError); ---------------- Hmmm -- is the block *expression* what contains the errors in this case or is it the block declaration? I would have expected this to be an issue for the block declaration created for the block expression. CC @rjmccall Repository: rG LLVM Github Monorepo 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