if (!CheckKind.hasValue())
return;
+ const RefState *RS = C.getState()->get<RegionState>(Sym);
+ assert(RS);
+ if (RS->getAllocationFamily() == AF_Alloca)
+ return;
+
assert(N);
if (!BT_Leak[*CheckKind]) {
BT_Leak[*CheckKind].reset(
typedef __typeof(sizeof(int)) size_t;
void *malloc(size_t);
+void *alloca(size_t);
void *valloc(size_t);
void free(void *);
void *realloc(void *ptr, size_t size);
}
}
+void allocaTest() {
+ int *p = alloca(sizeof(int));
+} // no warn
+
+void allocaBuiltinTest() {
+ int *p = __builtin_alloca(sizeof(int));
+} // no warn
+
int *realloctest1() {
int *q = malloc(12);
q = realloc(q, 20);