summaryrefslogtreecommitdiffstats
path: root/clang/test/VFS/relative-path.c
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-03-04 22:34:50 +0000
committerBen Langmuir <blangmuir@apple.com>2014-03-04 22:34:50 +0000
commita6f8ca8c5f62a79d319a00a4cb4b8bee6ddebc84 (patch)
tree8553f37d10e586fa9bee7b98ab42cd6308284360 /clang/test/VFS/relative-path.c
parent635631306fc8225c5cd34c0fb6bd960d3ea3f842 (diff)
downloadbcm5719-llvm-a6f8ca8c5f62a79d319a00a4cb4b8bee6ddebc84.tar.gz
bcm5719-llvm-a6f8ca8c5f62a79d319a00a4cb4b8bee6ddebc84.zip
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. llvm-svn: 202903
Diffstat (limited to 'clang/test/VFS/relative-path.c')
-rw-r--r--clang/test/VFS/relative-path.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/VFS/relative-path.c b/clang/test/VFS/relative-path.c
new file mode 100644
index 00000000000..e7101fb3a82
--- /dev/null
+++ b/clang/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();
+}
OpenPOWER on IntegriCloud