
Change the error message from "export declaration can only be used within a module purview" to "export declaration can only be used within a module interface" to be technically accurate. The previous message was misleading because export declarations are actually within a module purview when used in module implementation units, but they are only allowed in module interface units. This addresses the issue pointed out in GitHub issue #149008 where Bigcheese noted that the diagnostic wording was incorrect. Fixes #149008
15 lines
387 B
C++
15 lines
387 B
C++
|
|
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: split-file %s %t
|
|
//
|
|
// RUN: %clang_cc1 -std=c++20 %t/dummy.cppm -emit-module-interface -o %t/dummy.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -verify %t/test.cpp
|
|
|
|
|
|
//--- dummy.cppm
|
|
export module dummy;
|
|
|
|
//--- test.cpp
|
|
export import dummy; // expected-error {{export declaration can only be used within a module interface}}
|