This is an archive of the discontinued LLVM Phabricator instance.

[NFC][clang] Fix static analyzer concerns
ClosedPublic

Authored by Fznamznon on Aug 2 2023, 7:13 AM.

Details

Summary

ToolInvocation frees resources in the destructor but doesn't
have user-written copy c'tor or assignment operator, so copying it using
default ones can cause double free.

Diff Detail

Event Timeline

Fznamznon created this revision.Aug 2 2023, 7:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 7:13 AM
Fznamznon requested review of this revision.Aug 2 2023, 7:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 7:13 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.Aug 3 2023, 6:05 AM

LGTM, though I find the whole OwnsAction business to be a code smell. I think it'd be somewhat involved trying to address that though, so these changes are reasonable.

This revision is now accepted and ready to land.Aug 3 2023, 6:05 AM
This revision was automatically updated to reflect the committed changes.