diff options
Diffstat (limited to 'test/VFS')
-rw-r--r-- | test/VFS/Inputs/Incomplete.h | 1 | ||||
-rw-r--r-- | test/VFS/Inputs/IncompleteVFS.h | 1 | ||||
-rw-r--r-- | test/VFS/Inputs/incomplete-umbrella.modulemap | 5 | ||||
-rw-r--r-- | test/VFS/Inputs/vfsoverlay.yaml | 17 | ||||
-rw-r--r-- | test/VFS/incomplete-umbrella.m | 12 |
5 files changed, 36 insertions, 0 deletions
diff --git a/test/VFS/Inputs/Incomplete.h b/test/VFS/Inputs/Incomplete.h new file mode 100644 index 0000000000..29fafc3ccf --- /dev/null +++ b/test/VFS/Inputs/Incomplete.h @@ -0,0 +1 @@ +// does not include IncompleteVFS.h or IncompleteReal.h diff --git a/test/VFS/Inputs/IncompleteVFS.h b/test/VFS/Inputs/IncompleteVFS.h new file mode 100644 index 0000000000..22cfe7d6ad --- /dev/null +++ b/test/VFS/Inputs/IncompleteVFS.h @@ -0,0 +1 @@ +// IncompleteVFS.h diff --git a/test/VFS/Inputs/incomplete-umbrella.modulemap b/test/VFS/Inputs/incomplete-umbrella.modulemap new file mode 100644 index 0000000000..5afac92722 --- /dev/null +++ b/test/VFS/Inputs/incomplete-umbrella.modulemap @@ -0,0 +1,5 @@ +framework module Incomplete { + umbrella header "Incomplete.h" + export * + module * { export * } +} diff --git a/test/VFS/Inputs/vfsoverlay.yaml b/test/VFS/Inputs/vfsoverlay.yaml index 0aa8cd619a..f395d45ee3 100644 --- a/test/VFS/Inputs/vfsoverlay.yaml +++ b/test/VFS/Inputs/vfsoverlay.yaml @@ -29,6 +29,23 @@ }, { 'name': 'Foo.framework/Headers/Foo.h', 'type': 'file', 'external-contents': 'INPUT_DIR/Foo.h' + }, + { 'name': 'Incomplete.framework', 'type': 'directory', + 'contents': [ + { 'name': 'Headers', 'type': 'directory', + 'contents': [ + { 'name': 'Incomplete.h', 'type': 'file', + 'external-contents': 'INPUT_DIR/Incomplete.h' + }, + { 'name': 'IncompleteVFS.h', 'type': 'file', + 'external-contents': 'INPUT_DIR/IncompleteVFS.h' + } + ] + }, + { 'name': 'Modules/module.modulemap', 'type': 'file', + 'external-contents': 'INPUT_DIR/incomplete-umbrella.modulemap' + } + ] } ] } diff --git a/test/VFS/incomplete-umbrella.m b/test/VFS/incomplete-umbrella.m new file mode 100644 index 0000000000..4e138cc0f3 --- /dev/null +++ b/test/VFS/incomplete-umbrella.m @@ -0,0 +1,12 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t/Incomplete.framework/Headers +// RUN: echo '// IncompleteReal.h' > %t/Incomplete.framework/Headers/IncompleteReal.h +// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml +// RUN: not %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t \ +// RUN: -ivfsoverlay %t.yaml -F %t -fsyntax-only %s 2>&1 | FileCheck %s +// REQUIRES: shell + +@import Incomplete; +// CHECK: umbrella header for module 'Incomplete' {{.*}}IncompleteVFS.h +// CHECK: umbrella header for module 'Incomplete' {{.*}}IncompleteReal.h +// CHECK: could not build module 'Incomplete' |