From e7c31a9a22cbe598799db016b4553cb5fe93fa93 Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Wed, 22 Feb 2012 09:07:21 +0000 Subject: Throw away stray CXXDefaultArgExprs. Fixes PR12061. I think there's a deeper problem here in the way TransformCXXConstructExpr works, but I won't tackle it now. llvm-svn: 151146 --- clang/test/SemaCXX/new-delete.cpp | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'clang/test/SemaCXX/new-delete.cpp') diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp index d355c7cc51a..579ec33a43e 100644 --- a/clang/test/SemaCXX/new-delete.cpp +++ b/clang/test/SemaCXX/new-delete.cpp @@ -460,3 +460,43 @@ namespace P12023 { return 0; } } + +namespace PR12061 { + template struct scoped_array { + scoped_array(C* p = __null); + }; + template struct Foo { + Foo() : a_(new scoped_array[5]) { } + scoped_array< scoped_array > a_; + }; + class Bar {}; + Foo x; + + template struct scoped_array2 { + scoped_array2(C* p = __null, C* q = __null); + }; + template struct Foo2 { + Foo2() : a_(new scoped_array2[5]) { } + scoped_array2< scoped_array2 > a_; + }; + class Bar2 {}; + Foo2 x2; + + class MessageLoop { + public: + explicit MessageLoop(int type = 0); + }; + template + class CookieStoreTest { + protected: + CookieStoreTest() { + new MessageLoop; + } + }; + struct CookieMonsterTestTraits { + }; + class DeferredCookieTaskTest : public CookieStoreTest + { + DeferredCookieTaskTest() {} + }; +} -- cgit v1.2.3