Qualifiers on a canonical array type go on the outermost type, not the
innermost type. Fixes PR12142.
llvm-svn: 152456
diff --git a/clang/test/SemaCXX/overload-call.cpp b/clang/test/SemaCXX/overload-call.cpp
index 913d13f..1cfe068 100644
--- a/clang/test/SemaCXX/overload-call.cpp
+++ b/clang/test/SemaCXX/overload-call.cpp
@@ -563,3 +563,8 @@
Consumer c;
int n = sizeof(c(make<int()>()));
}
+
+namespace PR12142 {
+ void fun(int (*x)[10]); // expected-note{{candidate function not viable: 1st argument ('const int (*)[10]') would lose const qualifier}}
+ void g() { fun((const int(*)[10])0); } // expected-error{{no matching function for call to 'fun'}}
+}