Re: [PATCH v5] analyzer: support exception subclass matching [PR analyzer/119697]
David Malcolm <[email protected]> Mon, 03 Aug 2026 18:45:45 -0400
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2026-07-30 at 19:06 +0100, Egas Ribeiro wrote: > On Wed Jul 15, 2026 at 8:52 AM WEST, Egas Ribeiro wrote: > > The analyzer's exception_matches_type_p only treated an exception > > as > > caught when the handler type and exception type were identical, so > > a > > handler catching a base class did not match a thrown derived class. > > > > Add an exception_matches_type_p langhook returning whether a > > handler of > > one type catches an exception of another per the language's rules. > > The > > default returns false, preserving behavior for frontends without > > exception support (such as C). The C++ frontend implements it via > > can_convert_eh (now non-static). This keeps the analyzer language > > agnostic and the C++ catch-matching rules in the frontend. > > > > PR analyzer/119697 > > Jason, is this OK to push with the changed name for the hook? Egas: given Jason's positive feedback here: https://gcc.gnu.org/pipermail/gcc-patches/2026-July/723810.html and my approval of v4 here: https://gcc.gnu.org/pipermail/gcc-patches/2026-July/723995.html I think that v5 is OK for you to push, assuming this has had the usual testing (and that I'm correct in thinking you only changed the commit message relative to v4, right?). Thanks Dave