blob: 5fab9f3c75ea19473914aa601e682b76afd5475d [file] [log] [blame]
// Checks that Clang modules can be imported from within the global module
// fragment of a named module interface unit.
// Fixes #159768.
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
// RUN: %clang -std=c++23 -fmodules -fmodule-map-file=%t/module.modulemap \
// RUN: -fmodules-cache-path=%t --precompile %t/A.cppm -o %t/A.pcm
//--- module.modulemap
module foo { header "foo.h" }
//--- foo.h
// empty
//--- A.cppm
module;
#include "foo.h"
export module A;
export auto A() -> int { return 42; }