This is an archive of the discontinued LLVM Phabricator instance.

[NFC][clang] Fix static analyzer concerns
ClosedPublic

Authored by Fznamznon on Jul 20 2023, 8:14 AM.

Details

Summary

OMPTransformDirectiveScopeRAII doesn't have user-written copy
constructor/assignment operator but it frees memory in the destructor.
Delete these members since doesn't seem that OMPTransformDirectiveScopeRAII
objects are intended for copy.

Diff Detail

Event Timeline

Fznamznon created this revision.Jul 20 2023, 8:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2023, 8:14 AM
Fznamznon requested review of this revision.Jul 20 2023, 8:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2023, 8:14 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Jul 20 2023, 9:14 AM
tahonermann accepted this revision.Jul 20 2023, 9:49 AM

Looks good; the default implementations would definitely do the wrong thing, so this is a good find. My suggested edit is just to add a blank line.

clang/lib/CodeGen/CGStmtOpenMP.cpp
1823–1826
Fznamznon updated this revision to Diff 543417.Jul 24 2023, 1:51 AM

Rebase, fix format

This revision was automatically updated to reflect the committed changes.