5 Commits

Author SHA1 Message Date
duhbbx
fdec9fd4f8
[Clang] Fix export declaration diagnostic message (#149059)
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
2025-07-16 19:22:54 +02:00
Chuanqi Xu
574ee1c02e [C++20] [Modules] Prevent to accept clang modules
Close https://github.com/llvm/llvm-project/issues/64755

This wouldn't affect the form @import as the test shows. The two
affected test case `diag-flags.cpp` and `diag-pragma.cpp` are old test
cases in 2017 and 2018, when we're not so clear about the direction of
modules. And the things that these 2 tests tested can be covered by
clang modules naturally. So I change the them into clang modules to
not block this patch.
2023-08-17 11:45:50 +08:00
Chuanqi Xu
999ead9dc9 [Modules] Code cleanup after removing ModulesTS
Some codes become unused after we remove ModulesTS.
2023-02-16 15:22:38 +08:00
Argyrios Kyrtzidis
7b12e561ac [test/Modules/cxx20-export-import.cpp] Pre-clean the modules cache directory of the test, NFC 2022-08-05 17:27:43 -07:00
Timm Bäder
ba845787b3 [clang][sema] Add missing diagnostic parameter
The test case otherwise fails an assertion in Diagnostic::getArgKind().

Differential Revision: https://reviews.llvm.org/D116595
2022-01-24 09:59:20 +01:00