[PATCH] D116595: [clang][sema] Add missing diagnostic parameter
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 14 01:07:12 PST 2022
tbaeder updated this revision to Diff 399925.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116595/new/
https://reviews.llvm.org/D116595
Files:
clang/lib/Sema/SemaModule.cpp
clang/test/Modules/cxx20-export-import.cpp
Index: clang/test/Modules/cxx20-export-import.cpp
===================================================================
--- /dev/null
+++ clang/test/Modules/cxx20-export-import.cpp
@@ -0,0 +1,3 @@
+
+// RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps -I%S/Inputs -verify %s
+export import dummy; // expected-error {{export declaration can only be used within a module interface unit after the module declaration}}
Index: clang/lib/Sema/SemaModule.cpp
===================================================================
--- clang/lib/Sema/SemaModule.cpp
+++ clang/lib/Sema/SemaModule.cpp
@@ -395,7 +395,7 @@
// [module.interface]p1:
// An export-declaration shall inhabit a namespace scope and appear in the
// purview of a module interface unit.
- Diag(ExportLoc, diag::err_export_not_in_module_interface);
+ Diag(ExportLoc, diag::err_export_not_in_module_interface) << 0;
}
return Import;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116595.399925.patch
Type: text/x-patch
Size: 953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220114/52f6513a/attachment.bin>
More information about the cfe-commits
mailing list