This is an archive of the discontinued LLVM Phabricator instance.

Bugfix #34804 A universal catch should be able to deal with a passthrough throw.
Needs ReviewPublic

Authored by sgolemon on Oct 13 2017, 9:34 AM.

Details

Reviewers
rsmith
Summary

Given a function such as:

void foo() noexcept try {
  throw;
} catch(...) {
}

The clang-5.0 and later behavior is to assume the throw can't be
caught because its child element is checked first. This is incorrect.

We already have logic checking for a catch-all block which can
cope with this, so just move that higher in the priority.

Event Timeline

sgolemon created this revision.Oct 13 2017, 9:34 AM
sgolemon edited the summary of this revision. (Show Details)Oct 13 2017, 9:35 AM
sgolemon added a reviewer: rsmith.
sgolemon added a subscriber: cfe-commits.