bolt/deps/llvm-18.1.8/clang/test/Modules/pr67627.cppm

14 lines
487 B
Text
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm
// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fmodule-file=A=%t/A.pcm -fsyntax-only -verify
//--- A.cppm
export module A;
//--- B.cppm
import A; // expected-note {{add 'module;' to the start of the file to introduce a global module fragment}}
export module B; // expected-error {{module declaration must occur at the start of the translation unit}}