This is an archive of the discontinued LLVM Phabricator instance.

Handle shared release attributes correctly
ClosedPublic

Authored by aaronpuchert on Jul 31 2018, 3:08 PM.

Details

Diff Detail

Event Timeline

aaronpuchert created this revision.Jul 31 2018, 3:08 PM
aaron.ballman added inline comments.Aug 2 2018, 1:33 PM
test/SemaCXX/warn-thread-safety-analysis.cpp
4081–4085

Nothing calls either of these functions within the test; is that intended?

aaronpuchert added inline comments.Aug 3 2018, 4:45 AM
test/SemaCXX/warn-thread-safety-analysis.cpp
4081–4085

Yes, I just wanted to check that there are no warnings within the functions. Before the changes in lib/Analysis/ThreadSafety.cpp, we would get a warning "releasing mutex 'mu' using shared access, expected exclusive access" on line 4086.

My changes address the attributes on the function being analyzed, not on a function that is called from the function being analyzed.

aaron.ballman accepted this revision.Aug 3 2018, 7:19 AM

LGTM!

test/SemaCXX/warn-thread-safety-analysis.cpp
4081–4085

Ah, okay, thank you for the explanation. I wasn't aware that was previously failing, so I didn't see the behavioral change.

This revision is now accepted and ready to land.Aug 3 2018, 7:19 AM

Thanks for the review! Could you commit for me again?

Thanks for the review! Could you commit for me again?

I can, but it might also be a good idea for you to obtain your own commit privileges at this point (https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access), if that's something you're interested in. Let me know which route you'd like to go.

For now I think I'm done fixing things in the thread safety analysis, but if I see myself contributing more in the longer term, I will definitely try to obtain commit access.

aaron.ballman closed this revision.Aug 3 2018, 12:38 PM

For now I think I'm done fixing things in the thread safety analysis, but if I see myself contributing more in the longer term, I will definitely try to obtain commit access.

Sounds good to me. I've commit in r338912. Thank you for the thread safety analysis patches!