This is an archive of the discontinued LLVM Phabricator instance.

[mlir] fix DiagnosedSilenceableFailure::takeDiagnostics
ClosedPublic

Authored by ftynse on Sep 30 2022, 4:10 AM.

Details

Summary

This function was returning an rvalue reference to an object that was
also cleared via RAII when the function returned, making it always
return an empty object. Make it accept the mutable reference to the
object instead to avoid this dangerous behavior.

Diff Detail

Event Timeline

ftynse created this revision.Sep 30 2022, 4:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 4:10 AM
ftynse requested review of this revision.Sep 30 2022, 4:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 4:10 AM
guraypp accepted this revision.Sep 30 2022, 4:32 AM

It looks good, thanks for looking into that.

This revision is now accepted and ready to land.Sep 30 2022, 4:32 AM
This revision was automatically updated to reflect the committed changes.