Skip to content

Commit 80e4a70

Browse files
committed
Call placement new directly on the allocator
... avoiding handling a pointer to raw memory.
1 parent f6662a8 commit 80e4a70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3783,8 +3783,8 @@ void GenericSignatureBuilder::addGenericParameter(GenericTypeParamType *GenericP
37833783
Key.Index == 0)));
37843784

37853785
// Create a potential archetype for this type parameter.
3786-
void *mem = Impl->Allocator.Allocate<PotentialArchetype>();
3787-
auto PA = new (mem) PotentialArchetype(getASTContext(), GenericParam);
3786+
auto PA =
3787+
new (Impl->Allocator) PotentialArchetype(getASTContext(), GenericParam);
37883788
Impl->GenericParams.push_back(GenericParam);
37893789
Impl->PotentialArchetypes.push_back(PA);
37903790
}

0 commit comments

Comments
 (0)