danix800 updated this revision to Diff 542950.
danix800 added a comment.
1. Remove unnecessary condition & cleanup code
2. Move testcase into correct place.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155396/new/
https://reviews.llvm.org/D155396
danix800 added inline comments.
Comment at: clang/test/SemaObjC/crash-on-val-dep-block-expr.m:1
+// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s
+// no crash
danix800 wrote:
> hokein wrote:
> > can you move these tests to
> >
danix800 added inline comments.
Comment at: clang/lib/Sema/SemaStmt.cpp:3736
+BlockDecl *BD = CurBlock->TheDecl;
+if (!BD->isInvalidDecl() && RetValExp && RetValExp->containsErrors())
+ BD->setInvalidDecl();
hokein wrote:
> nit: the `isInvalidDecl`
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
danix800 updated this revision to Diff 542735.
danix800 edited the summary of this revision.
danix800 added a comment.
Herald added a reviewer: gkistanova.
Update clang/docs/ReleaseNotes.rst to reflect this fix.
Repository:
rZORG LLVM Github Zorg
CHANGES SINCE LAST ACTION
aaron.ballman added a comment.
This looks pretty good to me. Can you also add a release note for the fix to
`clang/docs/ReleaseNotes.rst`?
Comment at: clang/lib/Sema/SemaStmt.cpp:3733-3734
+ BlockScopeInfo *CurBlock = dyn_cast(CurCap);
+ if (CurBlock &&
danix800 updated this revision to Diff 542559.
danix800 edited the summary of this revision.
danix800 added a comment.
Invalidate `BlockDecl` with implicit return type, in case any of the return
value exprs is invalid.
Propagating the error info up by replacing `BlockExpr` with a `RecoveryExpr`.
danix800 added inline comments.
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();
+
hokein added a comment.
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();
+ });
+
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
danix800 created this revision.
danix800 added a reviewer: aaron.ballman.
danix800 added a project: clang.
Herald added a project: All.
danix800 requested review of this revision.
Herald added a subscriber: cfe-commits.
Fix https://github.com/llvm/llvm-project/issues/63863
Repository:
rG LLVM
11 matches
Mail list logo