// RUN: rm -rf %t // RUN: mkdir -p %t // RUN: split-file %s %t // // RUN: %clang_cc1 -std=c++20 %t/foo.cppm -verify -fsyntax-only //--- bar.h template struct Singleton { static T* instance_; static T* get() { static bool init = false; if (!init) { init = true; instance_ = ::new T(); } return instance_; } }; template T* Singleton::instance_ = nullptr; struct s{}; inline void* foo() { return Singleton::get(); } //--- foo.cppm // expected-no-diagnostics module; #include "bar.h" export module foo;