1// RUN: not %clang_cc1 -fmodule-implementation-of Foo -fmodule-name=Bar %s 2>&1 \ 2// RUN: | FileCheck -check-prefix=CHECK-IMPL-OF-ERR %s 3// CHECK-IMPL-OF-ERR: conflicting module names specified: '-fmodule-name=Bar' and '-fmodule-implementation-of Foo' 4 5// RUN: rm -rf %t 6// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ 7// RUN: -fmodule-implementation-of category_right -fsyntax-only 8 9// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ 10// RUN: -fmodule-implementation-of category_right -dM -E -o - 2>&1 | FileCheck %s 11// CHECK-NOT: __building_module 12 13// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ 14// RUN: -fmodule-implementation-of category_left -verify 15 16// RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ 17// RUN: -fmodule-implementation-of category_right -emit-pch -o %t.pch 18// RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ 19// RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right 20 21#ifndef WITH_PREFIX 22 23@import category_left; // expected-error{{@import of module 'category_left' in implementation of 'category_left'; use #import}} 24@import category_left.sub; // expected-error{{@import of module 'category_left.sub' in implementation of 'category_left'; use #import}} 25#import "category_right.h" // expected-error{{treating}} 26#import "category_right_sub.h" // expected-error{{treating}} 27 28#endif 29 30