[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 12 09:00:49 PDT 2024


martinboehme wrote:

> Per offline discussion, please see if we can be more targeted in our use of the generalized matching, given the potentially high cost incurred (for every relevant operation, like comparison, we'll be searching the entire type hierchy of the arguments).

Done!

I'm still checking for "optional or derived type" in some places where this seemed appropriate, but many places are now back to checking only for the optional type.

`isOptionalMemberCallWithNameMatcher()` was more involved that I expected -- see the comment on `getPublicReceiverType()` for the full details.

https://github.com/llvm/llvm-project/pull/84138


More information about the cfe-commits mailing list