[PATCH] D128704: [clang-extdef-mapping] Directly process .ast files

Tobias Hieta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 7 04:47:22 PDT 2022


thieta added inline comments.


================
Comment at: clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp:42
+      : Ctx(Context), SM(Context.getSourceManager()) {
+    CurrentFileName = astFilePath.str();
+  }
----------------
steakhal wrote:
> Why is this not initialized in the //initialized-list// like the rest of the members?
Ah no reason - I think I moved this around a few times so it just happened to end up here. I will push a NFC with that.


================
Comment at: clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp:149
+  if (!CI)
+    CI = new CompilerInstance();
+
----------------
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?


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