]> granicus.if.org Git - clang/commit
VirtualFileSystem: Fix false positives in YAMLVFSWriter::containedIn
authorJustin Bogner <mail@justinbogner.com>
Tue, 20 May 2014 22:12:58 +0000 (22:12 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 20 May 2014 22:12:58 +0000 (22:12 +0000)
commitf1b460f9ea35039296905b25cd6871f99b05652a
treec164381001507542f8e1f2a0022330e48774e7f9
parent3d9f4d1ad48291c1d983e7b6deff4f5d38dca76d
VirtualFileSystem: Fix false positives in YAMLVFSWriter::containedIn

Checking if a path starts with another path isn't sufficient for
determining if one is contained within the heirarchy of the other.
We need to ensure that the substring ends at a directory boundary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209250 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/VirtualFileSystem.cpp
unittests/libclang/LibclangTest.cpp