brintos

brintos / llvm-project-archived public Read only

0
0
Text · 909 B · 006ae96 Raw
19 lines · cpp
1// RUN: rm -rf %t2// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify3// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify -fno-modules-error-recovery4 5#define GIMME_A_K6#include "k.h"7 8#define GIMME_AN_L9#include "l.h" // expected-error {{module XG does not directly depend on a module exporting 'l.h', which is part of indirectly-used module XL}}10 11#include "m2.h" // expected-error {{module XG does not directly depend on a module exporting 'm2.h', which is part of indirectly-used module XM}}12const int use_m = m; // expected-error {{undeclared identifier}}13 14#define GIMME_AN_M15#include "m.h" // expected-error {{use of private header from outside its module: 'm.h'}}16const int use_m_2 = m;17 18const int g = k + l;19