const MemRegion* MR = cast<loc::MemRegionVal>(L).getRegion();
- // We return unknown for symbolic region for now. This might be improved.
+ // FIXME: return symbolic value for these cases.
// Example:
// void f(int* p) { int x = *p; }
- if (isa<SymbolicRegion>(MR))
+ // char* p = alloca();
+ // read(p);
+ // c = *p;
+ if (isa<SymbolicRegion>(MR) || isa<AllocaRegion>(MR))
return UnknownVal();
// FIXME: Perhaps this method should just take a 'const MemRegion*' argument
int data;
} STYPE;
+void g(char *p);
void g1(struct s* p);
// Array to pointer conversion. Array in the struct field.
void f6() {
char *p;
p = __builtin_alloca(10);
+ g(p);
+ char c = *p;
p[1] = 'a';
// Test if RegionStore::EvalBinOp converts the alloca region to element
// region.
// Retrieve the default value of element/field region.
void f11() {
struct s a;
- g(&a);
+ g1(&a);
if (a.data == 0) // no-warning
a.data = 1;
}