[PATCH] D54921: [analyzer] Remove memoization from RunLoopAutoreleaseLeakChecker
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 11 12:13:07 PST 2018
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<TriBoolTy> Cached = Memoization[C];
~ 78 if (!Cached) {
79 Cached = seenBeforeRec(C, A, B, Memoization);
+ 80 Memoization[C] = Cached;
+ 81 }
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54921/new/
https://reviews.llvm.org/D54921
More information about the cfe-commits
mailing list