summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-ms-templates.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-03-20 22:29:42 +0000
committerReid Kleckner <reid@kleckner.net>2013-03-20 22:29:42 +0000
commit831b71e0b57d446e56e1c7d8e50d890a03437fa8 (patch)
treebab667d48666034f7f08fa2c6f2c1311ed104750 /clang/test/CodeGenCXX/mangle-ms-templates.cpp
parent67f25272f193c4263f0cc29ee1af764c161ffb97 (diff)
downloadbcm5719-llvm-831b71e0b57d446e56e1c7d8e50d890a03437fa8.tar.gz
bcm5719-llvm-831b71e0b57d446e56e1c7d8e50d890a03437fa8.zip
[ms-cxxabi] Mangle function pointer template arguments correctly
Reviewers: rjmccall CC: timurrrr, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D554 llvm-svn: 177589
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-ms-templates.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-ms-templates.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-ms-templates.cpp b/clang/test/CodeGenCXX/mangle-ms-templates.cpp
index e16fe936bc2..d0e8af48884 100644
--- a/clang/test/CodeGenCXX/mangle-ms-templates.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms-templates.cpp
@@ -78,3 +78,16 @@ namespace space {
void use() {
space::foo(42);
}
+
+// PR13455
+typedef void (*FunctionPointer)(void);
+
+template <FunctionPointer function>
+void FunctionPointerTemplate() {
+ function();
+}
+
+void spam() {
+ FunctionPointerTemplate<spam>();
+// CHECK: "\01??$FunctionPointerTemplate@$1?spam@@YAXXZ@@YAXXZ"
+}
OpenPOWER on IntegriCloud