PR41427: This has apparently been fixed already, just add a regression
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 24 Apr 2019 23:45:56 +0000 (23:45 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 24 Apr 2019 23:45:56 +0000 (23:45 +0000)
test.

llvm-svn: 359155

clang/test/SemaTemplate/ctad.cpp [new file with mode: 0644]

diff --git a/clang/test/SemaTemplate/ctad.cpp b/clang/test/SemaTemplate/ctad.cpp
new file mode 100644 (file)
index 0000000..f294465
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -std=c++17 -verify %s
+
+// expected-no-diagnostics
+namespace pr41427 {
+  template <typename T> class A {
+  public:
+    A(void (*)(T)) {}
+  };
+  
+  void D(int) {}
+  
+  void f() {
+    A a(&D);
+    using T = decltype(a);
+    using T = A<int>;
+  }
+}