diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-10-12 09:22:07 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-10-12 09:22:07 +0000 |
commit | c3741ec8d364bb2490cf4abc0d3128cbad51f169 (patch) | |
tree | 0624af994afe4d743979710d054131d4bb10d01b /clang/unittests/Basic/VirtualFileSystemTest.cpp | |
parent | 6558edcaf5f4fcb1eaed7fccbbe018f7659b25ad (diff) | |
download | bcm5719-llvm-c3741ec8d364bb2490cf4abc0d3128cbad51f169.tar.gz bcm5719-llvm-c3741ec8d364bb2490cf4abc0d3128cbad51f169.zip |
[VFS] remove handling of '..' for now.
This can fail badly if we're overlaying a real file system and there are
symlinks there. Just keep the path as-is for now.
This essentially reverts r249830.
llvm-svn: 250021
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
-rw-r--r-- | clang/unittests/Basic/VirtualFileSystemTest.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp index b98e999cd60..6ed811f22f3 100644 --- a/clang/unittests/Basic/VirtualFileSystemTest.cpp +++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp @@ -569,7 +569,6 @@ TEST_F(InMemoryFileSystemTest, OverlayFileNoOwn) { TEST_F(InMemoryFileSystemTest, OpenFileForRead) { FS.addFile("/a", 0, MemoryBuffer::getMemBuffer("a")); FS.addFile("././c", 0, MemoryBuffer::getMemBuffer("c")); - FS.addFile("./d/../d", 0, MemoryBuffer::getMemBuffer("d")); auto File = FS.openFileForRead("/a"); ASSERT_EQ("a", (*(*File)->getBuffer("ignored"))->getBuffer()); File = FS.openFileForRead("/a"); // Open again. @@ -582,8 +581,6 @@ TEST_F(InMemoryFileSystemTest, OpenFileForRead) { ASSERT_EQ(File.getError(), errc::no_such_file_or_directory) << FS.toString(); File = FS.openFileForRead("./c"); ASSERT_EQ("c", (*(*File)->getBuffer("ignored"))->getBuffer()); - File = FS.openFileForRead("e/../d"); - ASSERT_EQ("d", (*(*File)->getBuffer("ignored"))->getBuffer()); } TEST_F(InMemoryFileSystemTest, DirectoryIteration) { |