[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Added a test in rC349000 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54921/new/ https://reviews.llvm.org/D54921 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. That is, it is modified within the recursive call. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54921/new/ https://reviews.llvm.org/D54921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think that it is modified, at least, when `Memoization[C]` is evaluated. The object needs to be created and put into the map in order to obtain a reference to it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54921/new/ https://reviews.ll

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @NoQ thanks, interesting! But I thought the underlying map is not actually modified while the reference is alive? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54921/new/ https://reviews.llvm.org/D54921 __

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, i think i get it. `Cached` is a reference. Changing `Memoization` will invalidate references because `DenseMap` doesn't provide the respective guarantee. Here's how the code should have looked: ~ 77 Optional Cached = Memoization[C]; ~ 78 if (!Cached) {

[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker

2018-12-10 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348822: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.l