blob: 140d14441019fd5d351531a547fcadd81c20c20e [file] [log] [blame]
Ben Langmuirad4bdd52014-07-23 15:30:23 +00001// RUN: rm -rf %t
James Y Knight2f3561f2019-01-29 19:33:48 +00002// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \
Manman Ren1211c902016-04-06 23:28:26 +00003// RUN: -fmodule-implementation-of category_right -fsyntax-only
Ben Langmuirad4bdd52014-07-23 15:30:23 +00004
James Y Knight2f3561f2019-01-29 19:33:48 +00005// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \
Manman Ren1211c902016-04-06 23:28:26 +00006// RUN: -fmodule-implementation-of category_right -dM -E -o - 2>&1 | FileCheck %s
Ben Langmuirad4bdd52014-07-23 15:30:23 +00007// CHECK-NOT: __building_module
8
James Y Knight2f3561f2019-01-29 19:33:48 +00009// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \
Manman Ren1211c902016-04-06 23:28:26 +000010// RUN: -fmodule-implementation-of category_left -verify
Ben Langmuirad4bdd52014-07-23 15:30:23 +000011
James Y Knight2f3561f2019-01-29 19:33:48 +000012// RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \
Manman Ren1211c902016-04-06 23:28:26 +000013// RUN: -fmodule-implementation-of category_right -emit-pch -o %t.pch
James Y Knight2f3561f2019-01-29 19:33:48 +000014// RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Werror=auto-import %s -I %S/Inputs \
Manman Ren1211c902016-04-06 23:28:26 +000015// RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right
Ben Langmuirad4bdd52014-07-23 15:30:23 +000016
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