[MS ABI] Treat ConstantArrayType like IncompleteArrayType in args
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 23 Apr 2015 05:21:20 +0000 (05:21 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 23 Apr 2015 05:21:20 +0000 (05:21 +0000)
commit96183f6b0659c036100ce4718d219ceb43a82edd
treea836fd972feb9e558e6aa9719543439ab052075e
parent8210fdf26ef0ac40486dd34253dda178fff78dd1
[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
clang/lib/AST/MicrosoftMangle.cpp
clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp