[PATCH] D136639: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C struct property is set using dot notation

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 19:46:13 PST 2023


ahatanak added a comment.

In D136639#4006953 <https://reviews.llvm.org/D136639#4006953>, @rjmccall wrote:

> Oh, I see.  That's a really unfortunate way to end up emitting this code pattern, since ignoring the result is so common.  To fix that, we'd have to either figure out the result was unused in Sema or do a relatively complex analysis in IRGen, though.

`DiagnoseUnusedExprResult` diagnoses unused expressions in Sema, so we can modify the `PseudoObjectExpr`s when it's called.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136639/new/

https://reviews.llvm.org/D136639



More information about the cfe-commits mailing list