[clang] f595003 - [NFC] [Modules] Add test for inherit default arguments
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 30 00:48:53 PDT 2022
Author: Chuanqi Xu
Date: 2022-06-30T15:48:22+08:00
New Revision: f595003e8e86bcb9531c2439f6a3771e669a3f3e
URL: https://github.com/llvm/llvm-project/commit/f595003e8e86bcb9531c2439f6a3771e669a3f3e
DIFF: https://github.com/llvm/llvm-project/commit/f595003e8e86bcb9531c2439f6a3771e669a3f3e.diff
LOG: [NFC] [Modules] Add test for inherit default arguments
Added:
clang/test/Modules/InheritDefaultArguments.cppm
Modified:
Removed:
################################################################################
diff --git a/clang/test/Modules/InheritDefaultArguments.cppm b/clang/test/Modules/InheritDefaultArguments.cppm
new file mode 100644
index 0000000000000..bbd5ad4c96a56
--- /dev/null
+++ b/clang/test/Modules/InheritDefaultArguments.cppm
@@ -0,0 +1,28 @@
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+// RUN: cd %t
+//
+// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm
+// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/Use.cppm -verify -fsyntax-only
+
+//--- foo.h
+template <typename T, typename U = int>
+class Templ;
+
+template <typename T, typename U>
+class Templ {};
+
+template <typename T>
+Templ(T t) -> Templ<T, int>;
+
+//--- A.cppm
+module;
+#include "foo.h"
+export module A;
+
+//--- Use.cppm
+// expected-no-diagnostics
+module;
+#include "foo.h"
+export module X;
+import A;
More information about the cfe-commits
mailing list