aaron.ballman added inline comments.

================
Comment at: clang/lib/AST/Interp/Descriptor.cpp:46
+
+  Ptr += sizeof(InitMap *);
   for (unsigned I = 0, NE = D->getNumElems(); I < NE; ++I) {
----------------
shafik wrote:
> I believe `Ptr` is not longer valid b/c of `free(IM)` b/c what `Ptr` points 
> to has not been free'ed 
> 
> I am looking at the wording now but I am curious what @aaron.ballman thinks.
How I see it is that it's converting `Ptr` to an `IntMap **`, dereferencing 
that back to `IntMap *` and then freeing *that* pointer. So it doesn't free 
`Ptr` itself, but what `Ptr` points to.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136826

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

Reply via email to