Skip to content

Commit 9e66df7

Browse files
committed
Sema: Fix ASAN failure
This fixes a use-after-free regression from my fix for <rdar://problem/38545956>.
1 parent 54b38d4 commit 9e66df7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,8 +1975,8 @@ namespace {
19751975
if (!nilDecl->hasInterfaceType())
19761976
return nullptr;
19771977

1978-
SubstitutionList subs = {Substitution(objectType, {})};
1979-
ConcreteDeclRef concreteDeclRef(tc.Context, nilDecl, subs);
1978+
Substitution sub(objectType, {});
1979+
ConcreteDeclRef concreteDeclRef(tc.Context, nilDecl, {sub});
19801980

19811981
auto nilType = FunctionType::get(
19821982
{MetatypeType::get(type)}, type);

0 commit comments

Comments
 (0)