[PATCH] D128704: [clang-extdef-mapping] Directly process .ast files
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 7 07:29:13 PDT 2022
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
More information about the cfe-commits
mailing list