2 // RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/shadow/A1 -I %S/Inputs/shadow/A2 %s -fsyntax-only 2>&1 | FileCheck %s -check-prefix=REDEFINITION
3 // RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodule-map-file=%S/Inputs/shadow/A1/module.modulemap -fmodule-map-file=%S/Inputs/shadow/A2/module.modulemap %s -fsyntax-only 2>&1 | FileCheck %s -check-prefix=REDEFINITION
4 // REDEFINITION: error: redefinition of module 'A'
5 // REDEFINITION: note: previously defined
7 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodule-map-file=%S/Inputs/shadow/A1/module.modulemap -I %S/Inputs/shadow %s -verify
13 #import "A2/A.h" // expected-note {{implicitly imported}}
14 // expected-error@A2/module.modulemap:1 {{import of shadowed module 'A'}}
15 // expected-note@A1/module.modulemap:1 {{previous definition}}
18 #error got the wrong definition of module A
19 #elif !defined(A1_A_h)
20 #error missing definition from A1