Skip to content

Commit 1b28888

Browse files
authored
Merge pull request #63501 from bnbarham/cherry-index-objc-impl-crash
[5.8][AST] Avoid possible segfault in isDirectToStorageAccess
2 parents 3d0906f + 20401b9 commit 1b28888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ static bool isDirectToStorageAccess(const DeclContext *UseDC,
21082108
if (!var->hasStorage())
21092109
return false;
21102110

2111-
auto *AFD = dyn_cast<AbstractFunctionDecl>(UseDC);
2111+
auto *AFD = dyn_cast_or_null<AbstractFunctionDecl>(UseDC);
21122112
if (AFD == nullptr)
21132113
return false;
21142114

0 commit comments

Comments
 (0)