This is an archive of the discontinued LLVM Phabricator instance.

[Utility] Replace Cleanup by llvm::scope_exit
ClosedPublic

Authored by JDevlieghere on Sep 9 2019, 4:15 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Sep 9 2019, 4:15 PM
jingham added a subscriber: jingham.Sep 9 2019, 4:27 PM
jingham added inline comments.
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
901–902 ↗(On Diff #219449)

This seems an undesirable cleanup. Now it is going to be hard to just put a breakpoint on the cleanup code, which seems worth the one extra line (and not related to replacing CleanUp with scope_exit. Ditto the one on 826. Is clang-format doing this for you?

Add a comment so you can easily break on the cleanup code.

This pattern repeated a couple of times north or the one you fixed. Can you get those too?

Add more comments to keep the original formatting.

This pattern repeated a couple of times north or the one you fixed. Can you get those too?

Thanks, I missed those. I believe I covered all the cases that were multi-line originally.

vsk accepted this revision.Sep 9 2019, 5:13 PM

Thanks a lot!

This revision is now accepted and ready to land.Sep 9 2019, 5:13 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2019, 5:19 PM
lldb/trunk/tools/lldb-test/lldb-test.cpp