summaryrefslogtreecommitdiffstats
path: root/test/Index
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2018-03-23 17:37:27 +0000
committerBen Langmuir <blangmuir@apple.com>2018-03-23 17:37:27 +0000
commite403c97d4e76caa48b2966be37c681a373eb5a5b (patch)
treea85eabafe2ab31d415a6bef212a3dc389c66a179 /test/Index
parentbb7269ae797f282e27e47eb4ebedfa6abe826e9e (diff)
[vfs] Don't bail out after a missing -ivfsoverlay file
This make -ivfsoverlay behave more like other fatal errors (e.g. missing -include file) by skipping the missing file instead of bailing out of the whole compilation. This makes it possible for libclang to still provide some functionallity as well as to correctly produce the fatal error diagnostic (previously we lost the diagnostic in libclang since there was no TU to tie it to). rdar://33385423 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index')
-rw-r--r--test/Index/missing_vfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Index/missing_vfs.c b/test/Index/missing_vfs.c
new file mode 100644
index 0000000000..61aedd41cf
--- /dev/null
+++ b/test/Index/missing_vfs.c
@@ -0,0 +1,6 @@
+// RUN: c-index-test -test-load-source local %s -ivfsoverlay %t/does-not-exist.yaml &> %t.out
+// RUN: FileCheck -check-prefix=STDERR %s < %t.out
+// STDERR: fatal error: virtual filesystem overlay file '{{.*}}' not found
+// RUN: FileCheck %s < %t.out
+// CHECK: missing_vfs.c:[[@LINE+1]]:6: FunctionDecl=foo:[[@LINE+1]]:6
+void foo(void);