Ben Langmuir | ad4bdd5 | 2014-07-23 15:30:23 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
James Y Knight | 2f3561f | 2019-01-29 19:33:48 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
Manman Ren | 1211c90 | 2016-04-06 23:28:26 +0000 | [diff] [blame] | 3 | // RUN: -fmodule-implementation-of category_right -fsyntax-only |
Ben Langmuir | ad4bdd5 | 2014-07-23 15:30:23 +0000 | [diff] [blame] | 4 | |
James Y Knight | 2f3561f | 2019-01-29 19:33:48 +0000 | [diff] [blame] | 5 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
Manman Ren | 1211c90 | 2016-04-06 23:28:26 +0000 | [diff] [blame] | 6 | // RUN: -fmodule-implementation-of category_right -dM -E -o - 2>&1 | FileCheck %s |
Ben Langmuir | ad4bdd5 | 2014-07-23 15:30:23 +0000 | [diff] [blame] | 7 | // CHECK-NOT: __building_module |
| 8 | |
James Y Knight | 2f3561f | 2019-01-29 19:33:48 +0000 | [diff] [blame] | 9 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
Manman Ren | 1211c90 | 2016-04-06 23:28:26 +0000 | [diff] [blame] | 10 | // RUN: -fmodule-implementation-of category_left -verify |
Ben Langmuir | ad4bdd5 | 2014-07-23 15:30:23 +0000 | [diff] [blame] | 11 | |
James Y Knight | 2f3561f | 2019-01-29 19:33:48 +0000 | [diff] [blame] | 12 | // RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
Manman Ren | 1211c90 | 2016-04-06 23:28:26 +0000 | [diff] [blame] | 13 | // RUN: -fmodule-implementation-of category_right -emit-pch -o %t.pch |
James Y Knight | 2f3561f | 2019-01-29 19:33:48 +0000 | [diff] [blame] | 14 | // RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
Manman Ren | 1211c90 | 2016-04-06 23:28:26 +0000 | [diff] [blame] | 15 | // RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right |
Ben Langmuir | ad4bdd5 | 2014-07-23 15:30:23 +0000 | [diff] [blame] | 16 | |
| 17 | #ifndef WITH_PREFIX |
| 18 | |
| 19 | @import category_left; // expected-error{{@import of module 'category_left' in implementation of 'category_left'; use #import}} |
| 20 | @import category_left.sub; // expected-error{{@import of module 'category_left.sub' in implementation of 'category_left'; use #import}} |
| 21 | #import "category_right.h" // expected-error{{treating}} |
| 22 | #import "category_right_sub.h" // expected-error{{treating}} |
| 23 | |
| 24 | #endif |
| 25 | |