diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-03-04 22:34:50 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-03-04 22:34:50 +0000 |
commit | 0366aa4b3f717fe4330ca128a4929ed2b7180f9e (patch) | |
tree | 7a77f84df115719a17f328dd8f75e0712e6f176d /test/VFS | |
parent | 5a37ee34c8094290014c510e282f7d92dd003ee9 (diff) |
Support relative paths in VFSFromYAML
Use llvm::sys::fs::make_absolute to get an absolute path before
matching. Also, allow "." directories to enable testing. ".." is still
not supported, and will require crossing file system boundaries to
implement correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/VFS')
-rw-r--r-- | test/VFS/relative-path.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/VFS/relative-path.c b/test/VFS/relative-path.c new file mode 100644 index 0000000000..e7101fb3a8 --- /dev/null +++ b/test/VFS/relative-path.c @@ -0,0 +1,11 @@ +// RUN: mkdir -p %t +// RUN: cd %t +// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml +// RUN: %clang_cc1 -Werror -I . -ivfsoverlay %t.yaml -fsyntax-only %s +// REQUIRES: shell + +#include "not_real.h" + +void foo() { + bar(); +} |