When operator new is used on a class with no constructor it generates an AGGR_INIT_EXPR, not a CALL_EXPR... with testcase. NPODB, static-checking only.

This commit is contained in:
Benjamin Smedberg
2008-12-03 11:49:54 -05:00
parent 5be7b713bf
commit e93d279a87
3 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
#include "nscore.h"
#include "nsAutoPtr.h"
class NS_STACK_CLASS A
{
int i;
};
void Foo()
{
nsAutoPtr<A> a(new A);
}