[PATCH] D25597: Try to fix buildbot failure in VirtualFileSystem caused by r284129.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 02:16:02 PDT 2016


ioeric updated this revision to Diff 74631.
ioeric added a comment.

- Separate assertions to get more information.


https://reviews.llvm.org/D25597

Files:
  lib/Basic/VirtualFileSystem.cpp


Index: lib/Basic/VirtualFileSystem.cpp
===================================================================
--- lib/Basic/VirtualFileSystem.cpp
+++ lib/Basic/VirtualFileSystem.cpp
@@ -1477,9 +1477,12 @@
 RedirectingFileSystem::lookupPath(sys::path::const_iterator Start,
                                   sys::path::const_iterator End, Entry *From) {
 #ifndef LLVM_ON_WIN32
-  assert(!isTraversalComponent(*Start) &&
-         !isTraversalComponent(From->getName()) &&
-         "Paths should not contain traversal components");
+  // FIXME: `remove_dots` does not remove leading "../" anymore, might need
+  // better test here.
+  assert(!Start->equals(".") &&
+         "Start should not be \".\"");
+  assert(!isTraversalComponent(From->getName()) &&
+         "From->getName() should not contain traversal components");
 #else
   // FIXME: this is here to support windows, remove it once canonicalized
   // paths become globally default.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25597.74631.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161014/33631ba2/attachment-0001.bin>


More information about the cfe-commits mailing list