[clang] [Clang] Fix Null Pointer Dereference in Sema::BuildClassMessageImplicit() (PR #90482)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 10:18:19 PDT 2024


https://github.com/tahonermann requested changes to this pull request.

I believe the static analyzer is reporting a false positive in this case. I don't think this change is correct. `BuildClassMessage()` only dereferences `receiverTypeInfo` if the provided source location is not valid. The existing `assert` already validates this case. The change would have the effect of eliding calls that are ok to make when `receiverTypeInfo` is null.

I think the right solution here is just to triage the static analysis report as a false positive.

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


More information about the cfe-commits mailing list