Index: lib/Basic/Module.cpp =================================================================== --- lib/Basic/Module.cpp +++ lib/Basic/Module.cpp @@ -184,10 +184,6 @@ if (Requested->isSubModuleOf(Use)) return true; - // Anyone is allowed to use our builtin stddef.h and its accompanying module. - if (!Requested->Parent && Requested->Name == "_Builtin_stddef_max_align_t") - return true; - return false; } Index: lib/Headers/module.modulemap =================================================================== --- lib/Headers/module.modulemap +++ lib/Headers/module.modulemap @@ -157,10 +157,6 @@ } } -module _Builtin_stddef_max_align_t [system] [extern_c] { - header "__stddef_max_align_t.h" -} - module opencl_c { requires opencl header "opencl-c.h" Index: test/Modules/Inputs/PR31905/my-project/module.modulemap =================================================================== --- /dev/null +++ test/Modules/Inputs/PR31905/my-project/module.modulemap @@ -0,0 +1,3 @@ +module my_project { + header "my-header.h" +} Index: test/Modules/Inputs/PR31905/my-project/my-header.h =================================================================== --- /dev/null +++ test/Modules/Inputs/PR31905/my-project/my-header.h @@ -0,0 +1,4 @@ +#ifndef MY_HEADER_H +#define MY_HEADER_H +#include +#endif Index: test/Modules/pr31905.cpp =================================================================== --- /dev/null +++ test/Modules/pr31905.cpp @@ -0,0 +1,9 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: cp -R %S/Inputs/PR31905 %t/other-include +// RUN: %clang_cc1 -std=c++11 -I%S/Inputs/PR31905/ -I%t/other-include -fmodules -fmodules-local-submodule-visibility \ +// RUN: -fimplicit-module-maps -fmodules-cache-path=%t -verify %s + +#include "my-project/my-header.h" + +int main() {} // expected-no-diagnostics