* return true if ptr is dangling in the given context */
| 497 | * return true if ptr is dangling in the given context |
| 498 | */ |
| 499 | bool |
| 500 | FactPointTo::is_dangling_ptr(const Variable* p, const std::vector<const Fact*>& facts) |
| 501 | { |
| 502 | FactPointTo fp(p); |
| 503 | const FactPointTo* fact = (const FactPointTo*)find_related_fact(facts, &fp); |
| 504 | return (fact && (fact->is_dead() && CGOptions::dead_pointer_dereference_prob() == 0)); |
| 505 | } |
| 506 | |
| 507 | /* return true if the variable has any chance to be a local variable after dereference */ |
| 508 | bool FactPointTo::is_pointing_to_locals(const Variable* v, const Block* b, int indirection, const vector<const Fact*>& facts) |
nothing calls this directly
no test coverage detected