1*0a6a1f1dSLionel Sambuc // RUN: rm -rf %t 2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify 3*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify -fno-modules-error-recovery 4*0a6a1f1dSLionel Sambuc 5*0a6a1f1dSLionel Sambuc #define GIMME_A_K 6*0a6a1f1dSLionel Sambuc #include "k.h" 7*0a6a1f1dSLionel Sambuc 8*0a6a1f1dSLionel Sambuc #define GIMME_AN_L 9*0a6a1f1dSLionel Sambuc #include "l.h" // expected-error {{module XG does not depend on a module exporting 'l.h'}} 10*0a6a1f1dSLionel Sambuc 11*0a6a1f1dSLionel Sambuc #include "m2.h" // expected-error {{module XG does not depend on a module exporting 'm2.h'}} 12*0a6a1f1dSLionel Sambuc const int use_m = m; // expected-error {{undeclared identifier}} 13*0a6a1f1dSLionel Sambuc 14*0a6a1f1dSLionel Sambuc #define GIMME_AN_M 15*0a6a1f1dSLionel Sambuc #include "m.h" // expected-error {{use of private header from outside its module: 'm.h'}} 16*0a6a1f1dSLionel Sambuc const int use_m_2 = m; 17*0a6a1f1dSLionel Sambuc 18*0a6a1f1dSLionel Sambuc const int g = k + l; 19