Skip to content

[C++20] [Modules] We can't diagnose the case that import before module declarations but not in GMF #67627

@ChuanqiXu9

Description

@ChuanqiXu9

Reproducer:

// 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;
export module B;

Actual behavior: no diagnostic emitted.
Expected behavior: an error diagnostic to tell we can't import A here.

Metadata

Metadata

Assignees

Labels

clang:modulesC++20 modules and Clang Header Modules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions