36 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %t3 4// RUN: %hmaptool write %S/Inputs/framework-public-includes-private/a.hmap.json %t/a.hmap5// RUN: %hmaptool write %S/Inputs/framework-public-includes-private/z.hmap.json %t/z.hmap6 7// RUN: sed -e "s@TEST_DIR@%{/S:regex_replacement}/Inputs/framework-public-includes-private@g" \8// RUN: %S/Inputs/framework-public-includes-private/z.yaml > %t/z.yaml9 10// The output with and without modules should be the same, without modules first.11// RUN: %clang_cc1 \12// RUN: -iquote %t/z.hmap -iquote %t/a.hmap -ivfsoverlay %t/z.yaml \13// RUN: -F%S/Inputs/framework-public-includes-private \14// RUN: -fsyntax-only %s -verify15 16// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache \17// RUN: -iquote %t/z.hmap -iquote %t/a.hmap -ivfsoverlay %t/z.yaml \18// RUN: -F%S/Inputs/framework-public-includes-private \19// RUN: -fsyntax-only %s \20// RUN: 2>%t/stderr21 22// The same warnings show up when modules is on but -verify doesn't get it23// because they only show up under the module A building context.24// RUN: FileCheck --input-file=%t/stderr %s25// CHECK: public framework header includes private framework header 'A/APriv.h'26// CHECK: public framework header includes private framework header 'A/APriv2.h'27// CHECK: public framework header includes private framework header 'Z/ZPriv.h'28 29#import "A.h"30 31int bar(void) { return foo(); }32 33// expected-warning@Inputs/framework-public-includes-private/A.framework/Headers/A.h:1{{public framework header includes private framework header 'A/APriv.h'}}34// expected-warning@Inputs/framework-public-includes-private/A.framework/Headers/A.h:2{{public framework header includes private framework header 'A/APriv2.h'}}35// expected-warning@Inputs/framework-public-includes-private/flat-header-path/Z.h:2{{public framework header includes private framework header 'Z/ZPriv.h'}}36