(
&mut self,
compiler: &'compiler interface::Compiler,
tcx: TyCtxt<'tcx>,
)
| 47 | |
| 48 | impl BypasserCallbacks { |
| 49 | fn run_analysis<'tcx, 'compiler>( |
| 50 | &mut self, |
| 51 | compiler: &'compiler interface::Compiler, |
| 52 | tcx: TyCtxt<'tcx>, |
| 53 | ) { |
| 54 | if self.source_name.contains("/libcore") |
| 55 | || self.source_name.contains("/compiler_builtins") |
| 56 | || self.source_name.contains("/liballoc") |
| 57 | || self.source_name.contains("/macro") |
| 58 | || self.source_name.contains("/libc") |
| 59 | { |
| 60 | info!( |
| 61 | "Find filename that should skip the analysis: {}", |
| 62 | self.source_name |
| 63 | ); |
| 64 | return; |
| 65 | } |
| 66 | |
| 67 | // Initialize global analysis context |
| 68 | if let Some(mut global_context) = |
| 69 | GlobalContext::new(&compiler.sess, tcx, self.analysis_options.clone()) |
| 70 | { |
| 71 | // Initialize numerical analyzer |
| 72 | let mut numerical_analysis = NumericalAnalysis::new(&mut global_context); |
| 73 | // Run analyzer |
| 74 | if let Ok(analysis_result) = numerical_analysis.run() { |
| 75 | info!( |
| 76 | "Numerical Analysis Completed: {} ms, diagnostics={}, supported_diagnostics={}, unsupported_diagnostics={}, call_boundary_diagnostics={}, supported_special_calls={}, unsupported_special_calls={}, opaque_call_boundaries={}", |
| 77 | analysis_result.analysis_time.as_millis(), |
| 78 | analysis_result.total_diagnostics, |
| 79 | analysis_result.supported_diagnostics, |
| 80 | analysis_result.unsupported_diagnostics, |
| 81 | analysis_result.call_boundary_diagnostics, |
| 82 | analysis_result.supported_special_calls, |
| 83 | analysis_result.unsupported_special_calls, |
| 84 | analysis_result.opaque_call_boundaries, |
| 85 | ); |
| 86 | } else { |
| 87 | error!("Numerical Analysis Failed"); |
| 88 | } |
| 89 | } else { |
| 90 | error!("GlobalContext Initialization Failed"); |
| 91 | } |
| 92 | } |
| 93 | } |
no test coverage detected