34 lines · plain
1// RUN: split-file %s %t2 3// There are two requirements here to result in the owner of a macro being null.4// 1) There must be a configuration mismatch between a header and a file it depends on5// 2) -fmodules-local-submodule-visibility must be enabled.6 7// In the following example, when compiling module C, A_H has no owning module.8 9// RUN: %clang_cc1 -I%t -emit-module -o %t/a.pcm -fmodules %t/module.modulemap -fmodule-name=a -fmodules-local-submodule-visibility 10// RUN: %clang_cc1 -fexceptions -Wno-module-file-config-mismatch -I%t -emit-module -o %t/b.pcm -fmodules %t/module.modulemap -fmodule-name=b -fmodules-local-submodule-visibility -fmodule-file=%t/a.pcm11// RUN: %clang_cc1 -fexceptions -Wno-module-file-config-mismatch -I%t -emit-module -o %t/c.pcm -fmodules %t/module.modulemap -fmodule-name=c -fmodules-local-submodule-visibility -fmodule-file=%t/a.pcm -fmodule-file=%t/b.pcm12 13//--- module.modulemap14module a { header "a.h" }15module b { header "b.h" }16module c { header "c.h" }17 18//--- a.h19#ifndef A_H20#define A_H21#endif22 23//--- b.h24#ifndef B_H25#define B_H26 27#include <a.h>28 29#endif30 31//--- c.h32#include <a.h>33#include <b.h>34