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:
12
xpcom/tests/static-checker/StackAggrInit.cpp
Normal file
12
xpcom/tests/static-checker/StackAggrInit.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user