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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to