This is an archive of the discontinued LLVM Phabricator instance.

Don't warn about an unreachable fallthrough annotation in a template function
ClosedPublic

Authored by ahmedasadi on Mar 16 2017, 8:52 PM.

Details

Summary

Clang currently doesn't warn about unreachable code in template functions, as it may not be unreachable in all instantiations.

Do the same for unreachable fallthrough annotations.

Diff Detail

Repository
rL LLVM

Event Timeline

ahmedasadi created this revision.Mar 16 2017, 8:52 PM
rsmith edited edge metadata.
rsmith added a subscriber: cfe-commits.

This needs a test case, but the change itself looks fine to me.

ahmedasadi updated this revision to Diff 92104.Mar 16 2017, 9:46 PM

Added a test case.

rsmith accepted this revision.Mar 16 2017, 10:36 PM

LGTM, do you need someone to commit for you?

This revision is now accepted and ready to land.Mar 16 2017, 10:36 PM

Thanks for reviewing. Yes, I need someone to commit for me.

This revision was automatically updated to reflect the committed changes.