amccarth added inline comments.
================ Comment at: source/Host/common/FileSpec.cpp:550 + (m_filename.GetStringRef() != ".." && m_filename.GetStringRef() != ".")) + return *this; ---------------- Do we have to worry about an unnecessary single dot in the directory, like `/foo/./bar/`? Are those handled when the FileSpec is constructed? ================ Comment at: source/Host/common/FileSpec.cpp:576 + if (component == ".") + continue; // Skip these. + if (component != "..") { ---------------- Ah, here we're skipping the unnecessary single dots, but the short-circuit at the top would prevent us from getting here unless the directory also contained a `/..`. ================ Comment at: unittests/Host/FileSpecTest.cpp:144 {R"(C:\bar)", R"(C:\foo\..\bar)"}, }; ---------------- How about a test to make sure `C:/foo/./bar` is the same as `C:/foo/bar`? ================ Comment at: unittests/Host/FileSpecTest.cpp:212 + {"foo/../bar", "bar"}, + {"../foo/..", ".."}, + }; ---------------- Here, too, I'd like to see test cases for paths with single dots. https://reviews.llvm.org/D26081 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits