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

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 23 06:51:14 PDT 2018


a.sidorin marked 2 inline comments as done.
a.sidorin added a comment.

Thank you Gabor!



================
Comment at: unittests/AST/ASTImporterTest.cpp:356
+  ImportAction(StringRef FromFilename, StringRef ToFilename,
+               const std::string &DeclName)
+      : FromFilename(FromFilename), ToFilename(ToFilename),
----------------
xazax.hun wrote:
> Maybe using StringRef for DeclName too?
I don't think it has too much sense - `hasName()` matcher's argument is `const std::string &` anyway.


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


Repository:
  rC Clang

https://reviews.llvm.org/D44079





More information about the cfe-commits mailing list