[llvm-branch-commits] [clang] 5b9fc44 - [clang] Add a C++17 deduction guide testcase.
Haojian Wu via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Dec 4 00:11:27 PST 2020
Author: Haojian Wu
Date: 2020-12-04T09:02:50+01:00
New Revision: 5b9fc44d8128717ef2f219b061c018abb85c717f
URL: https://github.com/llvm/llvm-project/commit/5b9fc44d8128717ef2f219b061c018abb85c717f
DIFF: https://github.com/llvm/llvm-project/commit/5b9fc44d8128717ef2f219b061c018abb85c717f.diff
LOG: [clang] Add a C++17 deduction guide testcase.
>From https://bugs.llvm.org/show_bug.cgi?id=47219.
It was crashing before the commit 1e14588d0f68.
Differential Revision: https://reviews.llvm.org/D92573
Added:
clang/test/PCH/cxx17-deduction-guide-decl.cpp
Modified:
Removed:
################################################################################
diff --git a/clang/test/PCH/cxx17-deduction-guide-decl.cpp b/clang/test/PCH/cxx17-deduction-guide-decl.cpp
new file mode 100644
index 000000000000..93ab82c02403
--- /dev/null
+++ b/clang/test/PCH/cxx17-deduction-guide-decl.cpp
@@ -0,0 +1,24 @@
+// Test with pch.
+// RUN: %clang_cc1 -emit-pch -std=c++17 -o %t %s
+// RUN: %clang_cc1 -include-pch %t -emit-llvm -std=c++17 -o - %s
+
+#ifndef HEADER
+#define HEADER
+
+namespace RP47219 {
+typedef int MyInt;
+template <typename T>
+class Some {
+ public:
+ explicit Some(T, MyInt) {}
+};
+
+struct Foo {};
+void ParseNatural() {
+ Some(Foo(), 1);
+}
+}
+
+#else
+
+#endif
More information about the llvm-branch-commits
mailing list