This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fixed uninitialized std::unique_ptr dereference.
ClosedPublic

Authored by vzakhari on Jan 26 2023, 2:19 PM.

Details

Summary

This fixes unittest failures reported in D142279:

flang-Unit :: Frontend/./FlangFrontendTests/5/7
flang-Unit :: Frontend/./FlangFrontendTests/6/7

Diff Detail

Event Timeline

vzakhari created this revision.Jan 26 2023, 2:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2023, 2:19 PM
vzakhari requested review of this revision.Jan 26 2023, 2:19 PM
awarzynski accepted this revision.Jan 26 2023, 11:45 PM

LGTM, thanks for fixing this!

This revision is now accepted and ready to land.Jan 26 2023, 11:45 PM
clementval accepted this revision.Jan 27 2023, 12:05 AM
foad added a subscriber: foad.Jan 27 2023, 1:25 AM
foad added inline comments.Jan 27 2023, 1:28 AM
flang/lib/Frontend/FrontendActions.cpp
784

How about refactoring this so we don't have to keep repeating ci.isOutputStreamNull() ? *os : ci.getOutputStream()?

Sorry, it looks like it went in after an awkward arc invocation for D142652. I was going to wait for the review before merging it.

foad added a comment.Jan 27 2023, 8:26 AM

Sorry, it looks like it went in after an awkward arc invocation for D142652. I was going to wait for the review before merging it.

No problem, I just noted it here for future reference. Thanks for the fix.