summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-subst.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-subst.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-subst.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-subst.cpp b/clang/test/CodeGenCXX/mangle-subst.cpp
new file mode 100644
index 00000000000..fc7304807d4
--- /dev/null
+++ b/clang/test/CodeGenCXX/mangle-subst.cpp
@@ -0,0 +1,20 @@
+// RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 &&
+
+struct X {};
+
+// RUN: grep "define void @_Z1f1XS_" %t | count 1 &&
+void f(X, X) { }
+
+// RUN: grep "define void @_Z1fR1XS0_" %t | count 1 &&
+void f(X&, X&) { }
+
+// RUN: grep "define void @_Z1fRK1XS1_" %t | count 1 &&
+void f(const X&, const X&) { }
+
+typedef void T();
+struct S {};
+
+// RUN: grep "define void @_Z1fPFvvEM1SFvvE" %t | count 1 &&
+void f(T*, T (S::*)) {}
+
+// RUN: true
OpenPOWER on IntegriCloud