This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Corrected the warn-on-throw-from-noexcept behavior to include nothrow
ClosedPublic

Authored by erichkeane on Sep 22 2017, 4:10 PM.

Details

Summary

Discovered that 'nothrow' (which is supposed to be an alias for noexcept)
was not warning with a throw inside of it. This patch corrects the behavior
previously created to add 'nothrow' to this list.

Diff Detail

Repository
rL LLVM

Event Timeline

erichkeane created this revision.Sep 22 2017, 4:10 PM
aaron.ballman accepted this revision.Sep 25 2017, 5:13 AM

Aside from a minor testing nit, LGTM! Thanks!

test/SemaCXX/warn-throw-out-noexcept-func.cpp
20 ↗(On Diff #116426)

Can you also add a test for __declspec(nothrow)?

This revision is now accepted and ready to land.Sep 25 2017, 5:13 AM
erichkeane marked an inline comment as done.Sep 26 2017, 11:22 AM
This revision was automatically updated to reflect the committed changes.