xref: /llvm-project/clang/test/Modules/private.cpp (revision 47972afd102f557553d7c6555240bd80982afdd1)
12cd24bd5SLawrence Crowl // RUN: rm -rf %t
2*47972afdSRichard Smith // RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/private %s -verify
3*47972afdSRichard Smith // RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/private %s -fsyntax-only -Wno-private-header
42cd24bd5SLawrence Crowl 
52cd24bd5SLawrence Crowl #include "common.h"
62cd24bd5SLawrence Crowl @import libPrivate1;
72cd24bd5SLawrence Crowl #include "private1.h" // expected-error {{use of private header from outside its module}}
82cd24bd5SLawrence Crowl #include "public2.h"
92cd24bd5SLawrence Crowl #include "private2.h" // expected-error {{use of private header from outside its module}}
102cd24bd5SLawrence Crowl 
112cd24bd5SLawrence Crowl struct use_this1 client_variable1;
122cd24bd5SLawrence Crowl struct use_this2 client_variable2;
132cd24bd5SLawrence Crowl struct mitts_off1 client_variable3;
142cd24bd5SLawrence Crowl struct mitts_off2 client_variable4;
15