Whether this variable is a fuzzable variable: 1. has init 2. is pointer ty 3. ty is `const` 4. inited with String or List.
(vd: &VarDecl, node: &Node)
| 409 | /// 3. ty is `const` |
| 410 | /// 4. inited with String or List. |
| 411 | pub fn is_var_fuzzable(vd: &VarDecl, node: &Node) -> bool { |
| 412 | if !vd.has_init(node) { |
| 413 | return false; |
| 414 | } |
| 415 | let ty = vd.get_type().get_type_name(); |
| 416 | |
| 417 | if !is_pointer_ty(&ty) { |
| 418 | return false; |
| 419 | } |
| 420 | |
| 421 | if !ty.starts_with("const") { |
| 422 | return false; |
| 423 | } |
| 424 | |
| 425 | let init = vd.get_init(node).ignore_cast().ignore_parent(); |
| 426 | matches!(&init.kind, Clang::StringLiteral(_) | Clang::InitListExpr(_)) |
| 427 | } |
| 428 | |
| 429 | pub fn is_integer_literal(node: &Node) -> bool { |
| 430 | let node = node.ignore_parenexpr(); |
nothing calls this directly
no test coverage detected