From f6e9ece5075a5ea007922ef72246470653fade1b Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 15 May 2009 16:09:15 +0000 Subject: Name mangling for class template specializations and template arguments. llvm-svn: 71861 --- clang/test/CodeGenCXX/mangle.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'clang/test/CodeGenCXX/mangle.cpp') diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp index c49abeb7efe..3f4d6fb706d 100644 --- a/clang/test/CodeGenCXX/mangle.cpp +++ b/clang/test/CodeGenCXX/mangle.cpp @@ -49,5 +49,31 @@ namespace N { int f(int, int) { static int b; return b; } } // RUN: grep "_ZGVZN1N1gEvE1a =" %t | count 1 && namespace N { int h(); void g() { static int a = h(); } } -// RUN: grep "_Z1fno" %t | count 1 +// RUN: grep "_Z1fno" %t | count 1 && void f(__int128_t, __uint128_t) { } + +template struct S1 {}; + +// RUN: grep "_Z1f2S1IiE" %t | count 1 && +void f(S1) {} + +// RUN: grep "_Z1f2S1IdE" %t | count 1 && +void f(S1) {} + +template struct S2 {}; +// RUN: grep "_Z1f2S2ILi100EE" %t | count 1 && +void f(S2<100>) {} + +// RUN: grep "_Z1f2S2ILin100EE" %t | count 1 && +void f(S2<-100>) {} + +template struct S3 {}; + +// RUN: grep "_Z1f2S3ILb1EE" %t | count 1 && +void f(S3) {} + +// RUN: grep "_Z1f2S3ILb0EE" %t | count 1 && +void f(S3) {} + +// RUN: grep "_Z2f22S3ILb1EE" %t | count 1 +void f2(S3<100>) {} -- cgit v1.2.3