[clang][ASTReader] Fix memory leak while reading FriendTemplateDecls
authorKadir Cetinkaya <kadircet@google.com>
Thu, 17 Feb 2022 21:01:29 +0000 (22:01 +0100)
committerKadir Cetinkaya <kadircet@google.com>
Fri, 18 Feb 2022 11:16:38 +0000 (12:16 +0100)
commit977b1f574fa18219fde5f709b906c79202ef1916
tree711f1813782a2dad7e4326336d2713b24427d3f0
parent535e7b09c189dd3a7ef65bd36a02962f0c98bd5e
[clang][ASTReader] Fix memory leak while reading FriendTemplateDecls

Allocate on ASTContext, rather than just on heap, so that template
parameter lists are freed up.

Differential Revision: https://reviews.llvm.org/D120081
clang/lib/Serialization/ASTReaderDecl.cpp