| 1 | // RUN: rm -rf %t |
| 2 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
| 3 | // RUN: -fmodule-implementation-of category_right -fsyntax-only |
| 4 | |
| 5 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
| 6 | // RUN: -fmodule-implementation-of category_right -dM -E -o - 2>&1 | FileCheck %s |
| 7 | // CHECK-NOT: __building_module |
| 8 | |
| 9 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
| 10 | // RUN: -fmodule-implementation-of category_left -verify |
| 11 | |
| 12 | // RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
| 13 | // RUN: -fmodule-implementation-of category_right -emit-pch -o %t.pch |
| 14 | // RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \ |
| 15 | // RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right |
| 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 | |
| 26 | |