Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 2 | |
| 3 | // Including a header from the imported module |
| 4 | // RUN: echo '@import FromImportedModuleOK;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 5 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 6 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 7 | // RUN: -Werror -fsyntax-only -x objective-c - |
| 8 | |
| 9 | // Including a non-modular header |
| 10 | // RUN: echo '@import FromImportedModuleFail;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 11 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 12 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 13 | // RUN: -I %S/Inputs/require-modular-includes \ |
| 14 | // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s |
| 15 | |
| 16 | // Including a header from a subframework |
| 17 | // RUN: echo '@import FromSubframework;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 18 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 19 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 20 | // RUN: -Werror -fsyntax-only -x objective-c - |
| 21 | |
| 22 | // Including a header from a subframework (fail) |
| 23 | // RUN: echo '@import FromNonModularSubframework;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 24 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 25 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 26 | // RUN: -I %S/Inputs/require-modular-includes \ |
| 27 | // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s |
| 28 | |
| 29 | // Including a non-modular header from a submodule |
| 30 | // RUN: echo '@import FromImportedSubModule;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 31 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 32 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 33 | // RUN: -I %S/Inputs/require-modular-includes \ |
| 34 | // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s |
| 35 | |
| 36 | // Including a non-modular header (directly) with -fmodule-name set |
| 37 | // RUN: echo '#include "NotInModule.h"' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 38 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 39 | // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \ |
| 40 | // RUN: -Werror -fmodule-name=A -fsyntax-only -x objective-c - |
| 41 | |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 42 | // Including an excluded header |
| 43 | // RUN: echo '@import IncludeExcluded;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 44 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 45 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 46 | // RUN: -Werror -fsyntax-only -x objective-c - |
| 47 | |
| 48 | // Including a header from another module |
| 49 | // RUN: echo '@import FromAnotherModule;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 50 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 51 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 52 | // RUN: -I %S/Inputs/require-modular-includes \ |
| 53 | // RUN: -Werror -fsyntax-only -x objective-c - |
| 54 | |
| 55 | // Including an excluded header from another module |
| 56 | // RUN: echo '@import ExcludedFromAnotherModule;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 57 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 58 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 59 | // RUN: -I %S/Inputs/require-modular-includes \ |
| 60 | // RUN: -Werror -fsyntax-only -x objective-c - |
| 61 | |
| 62 | // Including a header from an umbrella directory |
| 63 | // RUN: echo '@import FromUmbrella;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 64 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 65 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 66 | // RUN: -I %S/Inputs/require-modular-includes \ |
| 67 | // RUN: -Werror -fsyntax-only -x objective-c - |
| 68 | |
| 69 | // A includes B includes non-modular C |
| 70 | // RUN: echo '@import A;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 71 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 72 | // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ |
| 73 | // RUN: -I %S/Inputs/require-modular-includes \ |
| 74 | // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s |
| 75 | |
| 76 | // Non-framework module (pass) |
| 77 | // RUN: echo '@import NotFramework;' | \ |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 78 | // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 79 | // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \ |
| 80 | // RUN: -Werror -fsyntax-only -x objective-c - |
| 81 | |
Ben Langmuir | 71e1a64 | 2014-05-05 21:44:13 +0000 | [diff] [blame] | 82 | // CHECK: include of non-modular header |