return true if a variable in the list is a pointer to type "type" */
| 216 | |
| 217 | /* return true if a variable in the list is a pointer to type "type" */ |
| 218 | bool |
| 219 | VariableSelector::has_dereferenceable_var(const vector<Variable *>& vars, const Type* type, const CGContext& cg_context) |
| 220 | { |
| 221 | FactMgr* fm = get_fact_mgr(&cg_context); |
| 222 | for (size_t i=0; i<vars.size(); i++) { |
| 223 | Variable* var = vars[i]; |
| 224 | if (type->is_dereferenced_from(var->type) && FactPointTo::is_valid_ptr(var, fm->global_facts)) { |
| 225 | return true; |
| 226 | } |
| 227 | } |
| 228 | return false; |
| 229 | } |
| 230 | |
| 231 | /* |
| 232 | * check if a variable is eligible to be selected based on current context and |
nothing calls this directly
no test coverage detected