blob: a4f7fbec3b1767fe3496bdd87f64eab7722054b5 [file]
// 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: --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; }