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

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 9 01:13:08 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: lib/Basic/VirtualFileSystem.cpp:488
+  }
+  StringRef getName() const { return Stat.getName(); }
   InMemoryNodeKind getKind() const { return Kind; }
----------------
Given that this method is inconsistent with `getStatus()` and seems to be only used in `toString` methods, maybe we could make it `protected`? Otherwise it's really easy to write code that gets the wrong path.


Repository:
  rC Clang

https://reviews.llvm.org/D48903





More information about the cfe-commits mailing list