[MS ABI] Treat ConstantArrayType like IncompleteArrayType in args

Type backreferences for arguments use the DecayedType's original type.
Because of this, arguments with the same canonical type with the same
mangling would not backreference each other if one was a
ConstantArrayType while the other was an IncompleteArrayType.  Solve
this by canonicalizing the ConstantArrayType to a suitable
IncompleteArrayType.

This fixes PR23325.

llvm-svn: 235572
diff --git a/clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp b/clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
index fae2e1a..41aa89b 100644
--- a/clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
@@ -258,3 +258,8 @@
 void mangle_yes_backref4(int *const __restrict, int *const __restrict) {}
 // CHECK: "\01?mangle_yes_backref4@@YAXQIAH0@Z"
 // X64:   "\01?mangle_yes_backref4@@YAXQEIAH0@Z"
+
+struct S {};
+void pr23325(const S[1], const S[]) {}
+// CHECK: "\01?pr23325@@YAXQBUS@@0@Z"
+// X64:   "\01?pr23325@@YAXQEBUS@@0@Z"