From 23dfaa1cef1eb1b47195408fdd456a238097ee9c Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 1 May 2012 02:33:44 +0000 Subject: When mangling a synthetic function declaration, we might not have type-source information for its parameters. Don't crash when mangling them in the MS C++ ABI. Patch by Timur Iskhodzhanov! llvm-svn: 155879 --- clang/test/CodeGenCXX/mangle-ms.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'clang/test/CodeGenCXX/mangle-ms.cpp') diff --git a/clang/test/CodeGenCXX/mangle-ms.cpp b/clang/test/CodeGenCXX/mangle-ms.cpp index fe5fde1a1b3..ceaa669f199 100644 --- a/clang/test/CodeGenCXX/mangle-ms.cpp +++ b/clang/test/CodeGenCXX/mangle-ms.cpp @@ -103,3 +103,17 @@ void epsilon(int a[][10][20]) {} void zeta(int (^)(int, int)) {} // CHECK: @"\01?zeta@@YAXP_EAHHH@Z@Z" +void operator_new_delete() { + char *ptr = new char; +// CHECK: @"\01??2@YAPAXI@Z" + + delete ptr; +// CHECK: @"\01??3@YAXPAX@Z" + + char *array = new char[42]; +// CHECK: @"\01??_U@YAPAXI@Z" + + // FIXME: enable once PR12333 is fixed + // delete [] array; +// Should be: @"\01??_V@YAXPAX@Z" +} -- cgit v1.2.3