Return a shared_ptr from ScratchTypeSystemClang::GetForTarget() The current interface theoretically could lead to a use-after-free when a client holds on to the returned pointer. Fix this by returning a shared_ptr to the scratch typesystem. rdar://103619233 Differential Revision: https://reviews.llvm.org/D141100 GitOrigin-RevId: f8d7ab8cf8e859dcc7f696e8d01ed6fca502446a