From: Douglas Gregor Date: Sun, 29 Jan 2012 16:43:46 +0000 (+0000) Subject: Test module lookup within a subdirectory of a normal include directory. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f95cb328a5f4b5bf6d903b36861b1acc94b0505;p=clang Test module lookup within a subdirectory of a normal include directory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149196 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Modules/Inputs/subdir/module.map b/test/Modules/Inputs/subdir/module.map new file mode 100644 index 0000000000..4cd0215bbf --- /dev/null +++ b/test/Modules/Inputs/subdir/module.map @@ -0,0 +1,3 @@ +module subdir { + header "subdir.h" +} diff --git a/test/Modules/Inputs/subdir/subdir.h b/test/Modules/Inputs/subdir/subdir.h new file mode 100644 index 0000000000..0fb3d217ce --- /dev/null +++ b/test/Modules/Inputs/subdir/subdir.h @@ -0,0 +1 @@ +const char *getSubdir(); diff --git a/test/Modules/on-demand-build.m b/test/Modules/on-demand-build.m index 7b4a2ea1df..a7521fe78f 100644 --- a/test/Modules/on-demand-build.m +++ b/test/Modules/on-demand-build.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -verify %s -// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -verify %s -// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s #define FOO @import Module; @interface OtherClass @@ -22,3 +22,6 @@ void test_getModuleVersion() { # error MODULE_SUBFRAMEWORK_H should be hidden #endif +@import subdir; + +const char *getSubdirTest() { return getSubdir(); }