aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/canonical-expr-type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/canonical-expr-type.cpp')
-rw-r--r--test/SemaTemplate/canonical-expr-type.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/SemaTemplate/canonical-expr-type.cpp b/test/SemaTemplate/canonical-expr-type.cpp
index 250420bedb..767e0055d8 100644
--- a/test/SemaTemplate/canonical-expr-type.cpp
+++ b/test/SemaTemplate/canonical-expr-type.cpp
@@ -13,4 +13,14 @@ template<typename T, T N>
void f0(T x, __typeof__((f)(N)) y) { }
template<typename U, U M>
-void f0(U u, __typeof__(f(M))) { } // expected-error{{redefinition}} \ No newline at end of file
+void f0(U u, __typeof__(f(M))) { } // expected-error{{redefinition}}
+
+// Test dependently-sized array canonicalization
+template<typename T, int N, int M>
+void f1(T (&array)[N + M]) { } // expected-note{{previous}}
+
+template<typename T, int N, int M>
+void f1(T (&array)[M + N]) { }
+
+template<typename T, int M, int N>
+void f1(T (&array)[M + N]) { } // expected-error{{redefinition}}