Skip to content

Commit

Permalink
Use square brackets to match on func. name
Browse files Browse the repository at this point in the history
  • Loading branch information
adpaco-aws committed Apr 22, 2024
1 parent 12216ec commit e010665
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl<'tcx> GotocCtx<'tcx> {

let fun = self.current_fn().readable_name();
let instance = self.current_fn().instance_stable();
let cov_info = format!("{cov:?} ({fun})");
let cov_info = format!("{cov:?} [{fun}]");
// NOTE: This helps see the coverage info we're processing
// println!("COVERAGE: {:?} {:?} {:?}", cov, fun, stmt.span);
let cov_span = coverage_opaque_span(self.tcx, cov.clone(), instance);
Expand Down
4 changes: 2 additions & 2 deletions kani-driver/src/call_cbmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ fn coverage_results_from_properties(properties: &[Property]) -> Option<CoverageR
static RE: OnceLock<Regex> = OnceLock::new();
RE.get_or_init(|| {
Regex::new(
r#"^CounterIncrement\((?<counter_num>[0-9]+)\) \((?<func_name>[^)]+)\) - (?<span>.+)"#,
r#"^CounterIncrement\((?<counter_num>[0-9]+)\) \[(?<func_name>[^\]]+)\] - (?<span>.+)"#,
)
.unwrap()
})
Expand All @@ -429,7 +429,7 @@ fn coverage_results_from_properties(properties: &[Property]) -> Option<CoverageR
static RE: OnceLock<Regex> = OnceLock::new();
RE.get_or_init(|| {
Regex::new(
r#"^ExpressionUsed\((?<expr_num>[0-9]+)\) \((?<func_name>[^)]+)\) - (?<span>.+)"#,
r#"^ExpressionUsed\((?<expr_num>[0-9]+)\) \[(?<func_name>[^\]]+)\] - (?<span>.+)"#,
)
.unwrap()
})
Expand Down

0 comments on commit e010665

Please sign in to comment.