This is an archive of the discontinued LLVM Phabricator instance.

tsan: modernize MaybeReportThreadLeak
ClosedPublic

Authored by dvyukov on Aug 5 2021, 6:51 AM.

Details

Summary

Use C++ casts and auto.
Rename to CollectThreadLeaks b/c it's only collecting, not reporting.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Aug 5 2021, 6:51 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2021, 6:51 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Aug 5 2021, 6:59 AM
melver added inline comments.
compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
151–153

What about this line?
This is also doing a static cast and the type would still be obvious if using auto *.

This revision is now accepted and ready to land.Aug 5 2021, 6:59 AM
dvyukov updated this revision to Diff 364454.Aug 5 2021, 7:10 AM

use more auto

dvyukov marked an inline comment as done.Aug 5 2021, 7:11 AM
This revision was automatically updated to reflect the committed changes.