NoQ added a comment.

That's the one:

  typedef __typeof(sizeof(int)) size_t;
  void *malloc(size_t);
  
  void escape(int **);
  
  struct S {
    int *ptr;
  };
  
  void foo() {
    struct S s1;
    s1.ptr = malloc(sizeof(int));
    escape(&s1.ptr);
  }

After the patch the allocated symbol no longer escapes. It didn't end up having 
much to do with destructors. I'll also think about it a bit more.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57230



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

Reply via email to