Skip to content

Commit e010665

Browse files
committed
Use square brackets to match on func. name
1 parent 12216ec commit e010665

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl<'tcx> GotocCtx<'tcx> {
115115

116116
let fun = self.current_fn().readable_name();
117117
let instance = self.current_fn().instance_stable();
118-
let cov_info = format!("{cov:?} ({fun})");
118+
let cov_info = format!("{cov:?} [{fun}]");
119119
// NOTE: This helps see the coverage info we're processing
120120
// println!("COVERAGE: {:?} {:?} {:?}", cov, fun, stmt.span);
121121
let cov_span = coverage_opaque_span(self.tcx, cov.clone(), instance);

kani-driver/src/call_cbmc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ fn coverage_results_from_properties(properties: &[Property]) -> Option<CoverageR
419419
static RE: OnceLock<Regex> = OnceLock::new();
420420
RE.get_or_init(|| {
421421
Regex::new(
422-
r#"^CounterIncrement\((?<counter_num>[0-9]+)\) \((?<func_name>[^)]+)\) - (?<span>.+)"#,
422+
r#"^CounterIncrement\((?<counter_num>[0-9]+)\) \[(?<func_name>[^\]]+)\] - (?<span>.+)"#,
423423
)
424424
.unwrap()
425425
})
@@ -429,7 +429,7 @@ fn coverage_results_from_properties(properties: &[Property]) -> Option<CoverageR
429429
static RE: OnceLock<Regex> = OnceLock::new();
430430
RE.get_or_init(|| {
431431
Regex::new(
432-
r#"^ExpressionUsed\((?<expr_num>[0-9]+)\) \((?<func_name>[^)]+)\) - (?<span>.+)"#,
432+
r#"^ExpressionUsed\((?<expr_num>[0-9]+)\) \[(?<func_name>[^\]]+)\] - (?<span>.+)"#,
433433
)
434434
.unwrap()
435435
})

0 commit comments

Comments
 (0)