[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 6 05:41:56 PDT 2018

hokein added a comment.
Herald added a subscriber: omtcyfz.

The code looks good. I'll let Ben take a final look.

Comment at: lib/Basic/VirtualFileSystem.cpp:485
+  /// \p Status::Name in the return value, to mimic the behavior of \p RealFile.
+  Status getStatus(std::string RequestedName) const {
+    return Status::copyWithNewName(Stat, RequestedName);
Can we use llvm::StringRef here?

Comment at: unittests/Basic/VirtualFileSystemTest.cpp:950
+  clang::vfs::directory_iterator It = NormalizedFS.dir_begin("../b", EC);
+  clang::vfs::directory_iterator End;
This is not used.

  rC Clang


More information about the cfe-commits mailing list