summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-04-23 05:21:20 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-04-23 05:21:20 +0000
commit96183f6b0659c036100ce4718d219ceb43a82edd (patch)
treea836fd972feb9e558e6aa9719543439ab052075e /clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
parent8210fdf26ef0ac40486dd34253dda178fff78dd1 (diff)
downloadbcm5719-llvm-96183f6b0659c036100ce4718d219ceb43a82edd.tar.gz
bcm5719-llvm-96183f6b0659c036100ce4718d219ceb43a82edd.zip
[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
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp b/clang/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
index fae2e1ab2df..41aa89b61aa 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_backref3(ptr_to_fun_type *const, void (**const)(void)) {}
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"
OpenPOWER on IntegriCloud