]> granicus.if.org Git - clang/commit
VirtualFileSystem: Fix a few directory traversal bugs in VFSWriter
authorJustin Bogner <mail@justinbogner.com>
Wed, 21 May 2014 22:46:51 +0000 (22:46 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 21 May 2014 22:46:51 +0000 (22:46 +0000)
commit9fefd0267aa6e0cd72d5ec0733e2c044af0aca32
tree20453865095802c138feceebe4c86be0ff06dce1
parentb717625aacdf2badd592f1e2e8714a343464e2a5
VirtualFileSystem: Fix a few directory traversal bugs in VFSWriter

There are a couple of issues with writing VFS maps that are awkward to
fix within the current mutually recursive approach. Instead, replace
the algorithm with an iterative version that uses an explicit stack of
directories.

Includes tests for cases the old approach was tripping on.

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