1// RUN: rm -rf %t
2// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
3// RUN:                -I %S/Inputs/submodules %s 2>&1 | FileCheck %s
4// CHECK: import of module 'import_self.c' appears within same top-level module 'import_self'
5
6// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
7// RUN:                -I %S/Inputs/submodules -fmodule-name=import_self %s \
8// RUN:     2>&1 |  FileCheck -check-prefix=CHECK-fmodule-name %s
9// CHECK-fmodule-name: @import of module 'import_self.b' in implementation of 'import_self'
10
11@import import_self.b;
12