Resolve the static-analysis bustage from bug 498938 by recognizing COND_EXPR.
This commit is contained in:
12
xpcom/tests/static-checker/StackCond.cpp
Normal file
12
xpcom/tests/static-checker/StackCond.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "nscore.h"
|
||||
|
||||
struct A
|
||||
{
|
||||
};
|
||||
|
||||
A* tfunc(int len)
|
||||
{
|
||||
A arr[5];
|
||||
A* a = len <= 5 ? arr : new A[len];
|
||||
return a;
|
||||
}
|
||||
Reference in New Issue
Block a user