pub struct CppTemporaryFreeCallIndex<'a> { /* private fields */ }Expand description
The per-file index answering whether a call expression provably materializes no automatic object that needs destruction.
Implementations§
Source§impl<'a> CppTemporaryFreeCallIndex<'a>
impl<'a> CppTemporaryFreeCallIndex<'a>
Sourcepub fn build(source: &'a str, root: Node<'a>) -> Self
pub fn build(source: &'a str, root: Node<'a>) -> Self
Build the index from a parsed C++ translation unit.
Sourcepub fn visited_nodes(&self) -> usize
pub fn visited_nodes(&self) -> usize
Named nodes visited while building, for lowering work accounting.
Sourcepub fn call_is_provably_temporary_free(&self, call: Node<'_>) -> bool
pub fn call_is_provably_temporary_free(&self, call: Node<'_>) -> bool
Whether call provably materializes no automatic object that needs
destruction: the callee is one exact, unshadowed, non-template local
free function whose return and parameter types are provably trivially
destructible, and every argument is a trivially shaped expression.
Nested call arguments are accepted here because the caller’s scan
classifies each nested call expression on its own.
Auto Trait Implementations§
impl<'a> Freeze for CppTemporaryFreeCallIndex<'a>
impl<'a> RefUnwindSafe for CppTemporaryFreeCallIndex<'a>
impl<'a> Send for CppTemporaryFreeCallIndex<'a>
impl<'a> Sync for CppTemporaryFreeCallIndex<'a>
impl<'a> Unpin for CppTemporaryFreeCallIndex<'a>
impl<'a> UnsafeUnpin for CppTemporaryFreeCallIndex<'a>
impl<'a> UnwindSafe for CppTemporaryFreeCallIndex<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more