steakhal added inline comments.

================
Comment at: clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp:149
+  if (!CI)
+    CI = new CompilerInstance();
+
----------------
thieta wrote:
> steakhal wrote:
> > What takes the ownership of `CI`? When is it deleted?
> I don't think anyone takes ownership and it's never properly deleted. I don't 
> think we really need to since this application just runs and exits and never 
> really keep any state. Do you see a problem with it never being deleted?
Not a big deal. I just think that in general, leak suggests bad software design.
On the other hand, one should not have non-primitive global variables, such as 
smart-pointers. I mean, it's still bad, but let's not touch it xD


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128704

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

Reply via email to