This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Mark throw_bad_alloc_helper() as [[noreturn]].
ClosedPublic

Authored by STL_MSFT on Jun 22 2016, 3:21 PM.

Details

Summary

Mark throw_bad_alloc_helper() as [[noreturn]].

This avoids MSVC /analyze warnings about new returning null, since [[noreturn]] allows the analyzer to see what's happening.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 61618.Jun 22 2016, 3:21 PM
STL_MSFT retitled this revision from to [libcxx] [test] Mark throw_bad_alloc_helper() as [[noreturn]]..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF edited edge metadata.Jun 26 2016, 12:45 PM

I don't think all the compilers libc++ tests with support [[noreturn]] yet. I'll commit a similar patch to this though.

EricWF accepted this revision.Jun 26 2016, 12:51 PM
EricWF edited edge metadata.

Accepting before closing.
I committed something similar in r273819. Please let me know if it doesn't work.

This revision is now accepted and ready to land.Jun 26 2016, 12:51 PM
EricWF closed this revision.Jun 26 2016, 12:51 PM