[clang] 255b2d8 - Add test for issue 60486
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 23 22:32:24 PST 2023
Author: Chuanqi Xu
Date: 2023-02-24T14:32:05+08:00
New Revision: 255b2d8162ead0ad444698506f97484572e574b1
URL: https://github.com/llvm/llvm-project/commit/255b2d8162ead0ad444698506f97484572e574b1
DIFF: https://github.com/llvm/llvm-project/commit/255b2d8162ead0ad444698506f97484572e574b1.diff
LOG: Add test for issue 60486
Close https://github.com/llvm/llvm-project/issues/60486.
When I look back at this problem again, it only appears if we specify it
with `-fmodule-file=<BMI-path>`. And it disappears after we specify it
as `-fmodule-file=<module-name>=<BMI-path>`. Since we want to depreacate
the form `-fmodule-file=<BMI-path>`, we can think the problem goes
away.
Added:
clang/test/Modules/pr60486.cppm
Modified:
Removed:
################################################################################
diff --git a/clang/test/Modules/pr60486.cppm b/clang/test/Modules/pr60486.cppm
new file mode 100644
index 0000000000000..13802a4917e6e
--- /dev/null
+++ b/clang/test/Modules/pr60486.cppm
@@ -0,0 +1,28 @@
+// Address: https://github.com/llvm/llvm-project/issues/60486
+//
+// 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 -fmodule-file=a=%t/a.pcm %t/b.cppm -fsyntax-only -verify
+
+//--- foo.h
+template<typename = void>
+struct s {
+};
+
+template<typename>
+concept c = requires { s{}; };
+
+//--- a.cppm
+module;
+#include "foo.h"
+export module a;
+
+//--- b.cppm
+// expected-no-diagnostics
+module;
+#include "foo.h"
+export module b;
+import a;
More information about the cfe-commits
mailing list