Date & Time
Wednesday, October 29, 2025, 11:30 AM - 12:00 PM
Name
Lifetime Safety in Clang
Session Type
Technical Talk
Abstract/s

This talk introduces a new, powerful **intra-procedural, flow-sensitive lifetime analysis in Clang** designed to detect complex use-after-scope and use-after-return bugs in C++. Moving beyond simple statement-local checks, this analysis tracks pointer and reference origins across entire function bodies and control-flow paths. It employs a sophisticated dataflow analysis model inspired by **Rust's borrow checker (Polonius)**, using symbolic "Origins" and "Loans" to reason about object lifetimes. The feature is integrated as a native Clang warning, is highly configurable, and is designed for safe default enablement in large codebases. While not a full borrow checker, this analysis lays the crucial infrastructure for potentially introducing Rust-like lifetime annotations into C++ in the future, promising stronger correctness guarantees.

Location Name
Hall of Cities