mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #63320 from bnbarham/index-objc-impl-crash
[AST] Avoid possible segfault in isDirectToStorageAccess
This commit is contained in:
@@ -2165,7 +2165,7 @@ static bool isDirectToStorageAccess(const DeclContext *UseDC,
|
||||
if (!var->hasStorage())
|
||||
return false;
|
||||
|
||||
auto *AFD = dyn_cast<AbstractFunctionDecl>(UseDC);
|
||||
auto *AFD = dyn_cast_or_null<AbstractFunctionDecl>(UseDC);
|
||||
if (AFD == nullptr)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user