| 136 | } |
| 137 | |
| 138 | fn get_suppressed_warnings(arg: &str) -> Option<Vec<DiagnosticCause>> { |
| 139 | let mut res = Vec::new(); |
| 140 | for ch in arg.chars() { |
| 141 | match ch { |
| 142 | 'a' => res.push(DiagnosticCause::Arithmetic), // Arithmetic overflow |
| 143 | 'b' => res.push(DiagnosticCause::Bitwise), // Bit-wise overflow |
| 144 | 's' => res.push(DiagnosticCause::Assembly), // Inline assembly |
| 145 | 'c' => res.push(DiagnosticCause::Comparison), // Comparison operations |
| 146 | 'd' => res.push(DiagnosticCause::DivZero), // Division by zero / remainder by zero |
| 147 | 'm' => res.push(DiagnosticCause::Memory), // Memory-safety issues |
| 148 | 'p' => res.push(DiagnosticCause::Panic), // Run into panic code |
| 149 | 'i' => res.push(DiagnosticCause::Index), // Out-of-bounds access |
| 150 | 'u' => res.push(DiagnosticCause::Unsupported), // Unsupported fragment |
| 151 | _ => return None, // Invalid flags |
| 152 | } |
| 153 | } |
| 154 | if res.is_empty() { |
| 155 | None |
| 156 | } else { |
| 157 | Some(res) |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | fn get_domain_type(arg: &str) -> Option<AbstractDomainType> { |
| 162 | match arg { |