summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/PR41139.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/PR41139.cpp')
-rw-r--r--test/SemaCXX/PR41139.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaCXX/PR41139.cpp b/test/SemaCXX/PR41139.cpp
new file mode 100644
index 0000000000..e120e42b8b
--- /dev/null
+++ b/test/SemaCXX/PR41139.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify %s
+
+// expected-no-diagnostics
+
+// This test should not crash.
+int f1( unsigned ) { return 0; }
+
+template <class R, class... Args>
+struct S1 {
+ S1( R(*f)(Args...) ) {}
+};
+
+int main() {
+ S1 s1( f1 );
+}