| 716 | } |
| 717 | |
| 718 | std::vector<const Variable*> |
| 719 | FactPointTo::merge_pointees_of_pointers(const std::vector<const Variable*>& ptrs, const std::vector<const Fact*>& facts) |
| 720 | { |
| 721 | size_t i, j; |
| 722 | vector<const Variable*> pointee_vars; |
| 723 | for (i=0; i<ptrs.size(); i++) { |
| 724 | const Variable* p = ptrs[i]; |
| 725 | if (FactPointTo::is_special_ptr(p)) continue; |
| 726 | FactPointTo dummy(p); |
| 727 | const FactPointTo* exist_fact = (const FactPointTo*)find_related_fact(facts, &dummy); |
| 728 | // I can not think of a reason this is null |
| 729 | // well...this actually happens when p is a parameter of function f, and we are in the middle of creating f |
| 730 | assert(exist_fact); |
| 731 | if (exist_fact) { |
| 732 | for (j=0; j<exist_fact->get_point_to_vars().size(); j++) { |
| 733 | const Variable* pointee = exist_fact->get_point_to_vars()[j]; |
| 734 | add_variable_to_set(pointee_vars, pointee); |
| 735 | } |
| 736 | } |
| 737 | } |
| 738 | return pointee_vars; |
| 739 | } |
| 740 | |
| 741 | /* |
| 742 | * check if one of the array indices is based on given variable, if yes, modifying |
nothing calls this directly
no test coverage detected