150
|
1 // RUN: rm -rf %t
|
|
2
|
|
3 // Including a header from the imported module
|
|
4 // RUN: echo '@import FromImportedModuleOK;' | \
|
|
5 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
11 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
18 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
24 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
31 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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"' | \
|
|
38 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
39 // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
|
|
40 // RUN: -Werror -fmodule-name=A -fsyntax-only -x objective-c -
|
|
41
|
|
42 // Including an excluded header
|
|
43 // RUN: echo '@import IncludeExcluded;' | \
|
|
44 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
50 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
57 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
64 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
71 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
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;' | \
|
|
78 // RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \
|
|
79 // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
|
|
80 // RUN: -Werror -fsyntax-only -x objective-c -
|
|
81
|
|
82 // CHECK: include of non-modular header
|