Re: [PATCH v5] analyzer: support exception subclass matching [PR analyzer/119697]

"Egas Ribeiro" <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
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?

Thanks,
Egas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.