]> granicus.if.org Git - clang/commitdiff
Add test from PR5913, which has already been fixed
authorDouglas Gregor <dgregor@apple.com>
Wed, 6 Jan 2010 22:09:05 +0000 (22:09 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 6 Jan 2010 22:09:05 +0000 (22:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92863 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p3.cpp

index 167c67d51974b4ac8a2b84c8908f8feafc2805d0..19962c534909f99a390aa78e2a6d8313664db902 100644 (file)
@@ -50,6 +50,19 @@ void test_f2(int i, const int ci, volatile int vi) {
   A<volatile int> a2 = f2(vi);
 }
 
+// PR5913
+template <typename T, int N>
+void Foo(const T (&a)[N]) {
+  T x;
+  x = 0;
+}
+
+const int a[1] = { 0 };
+
+void Test() {
+  Foo(a);
+}
+
 //   - The transformed A can be another pointer or pointer to member type that 
 //     can be converted to the deduced A via a qualification conversion (4.4).
 template<typename T> A<T> f3(T * * const * const);