From 6ef06cc48debc9f0881f3439cfc4ac722fc42879 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 12 Jul 2011 04:47:20 +0000 Subject: Implement the Itanium C++ ABI's mangling rule for non-instantiation-dependent sizeof and alignof expressions. llvm-svn: 134963 --- clang/test/CodeGenCXX/mangle.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'clang/test/CodeGenCXX/mangle.cpp') diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp index 8f1c682bb06..56e70a2b151 100644 --- a/clang/test/CodeGenCXX/mangle.cpp +++ b/clang/test/CodeGenCXX/mangle.cpp @@ -804,9 +804,25 @@ namespace test33 { } namespace test34 { + // Mangling for instantiation-dependent decltype expressions. template void f(decltype(sizeof(decltype(T() + T())))) {} // CHECK: define weak_odr void @_ZN6test341fIiEEvDTstDTplcvT__EcvS1__EEE template void f(decltype(sizeof(1))); + + // Mangling for non-instantiation-dependent sizeof expressions. + template + void f2(int (&)[N + sizeof(int*)]) {} + + // CHECK: define weak_odr void @_ZN6test342f2ILj4EEEvRAplT_Lm8E_i + template void f2<4>(int (&)[4 + sizeof(int*)]); + + // Mangling for non-instantiation-dependent sizeof expressions + // involving an implicit conversion of the result of the sizeof. + template + void f3(int (&)[N + sizeof(int*)]) {} + + // CHECK: define weak_odr void @_ZN6test342f3ILy4EEEvRAplT_Ly8E_i + template void f3<4>(int (&)[4 + sizeof(int*)]); } -- cgit v1.2.3