[PATCH] D44079: [ASTImporter] Allow testing of import sequences; fix import of typedefs for anonymous decls

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 12 09:17:38 PDT 2018


xazax.hun accepted this revision.
xazax.hun added a comment.
This revision is now accepted and ready to land.

Overall looks good, some minor nits inline.  If those can be resolved trivially, I am ok with committing this without another round of reviews.



================
Comment at: unittests/AST/ASTImporterTest.cpp:91
+static void createVirtualFileIfNeeded(ASTUnit *ToAST, StringRef FileName,
+                                      const std::string &Code) {
+  return createVirtualFileIfNeeded(
----------------
If we already touching this part, maybe better to take the code as a StringRef?


================
Comment at: unittests/AST/ASTImporterTest.cpp:356
+  ImportAction(StringRef FromFilename, StringRef ToFilename,
+               const std::string &DeclName)
+      : FromFilename(FromFilename), ToFilename(ToFilename),
----------------
Maybe using StringRef for DeclName too?


================
Comment at: unittests/AST/ASTImporterTest.cpp:416
+      AllASTUnits[Filename] = Found->getValue().createASTUnits(Filename);
+      BuiltASTs[Filename] = true;
+    }
----------------
Do we need this? Can't we just say if a filename is in `AllASTUnits`, it is built?


Repository:
  rC Clang

https://reviews.llvm.org/D44079





More information about the cfe-commits mailing list