MCPcopy Create free account
hub / github.com/CodeSentryAI/lockbud / first_two_args

Function first_two_args

src/detector/atomic/mod.rs:198–212  ·  view source on GitHub ↗
(
    location: Location,
    body: &Body<'tcx>,
)

Source from the content-addressed store, hash-verified

196
197fn first_two_args<'tcx>(
198 location: Location,
199 body: &Body<'tcx>,
200) -> Option<(Place<'tcx>, Option<Place<'tcx>>)> {
201 if let TerminatorKind::Call {
202 func: _func, args, ..
203 } = &body[location.block].terminator().kind
204 {
205 let place0 = args.first()?.node.place()?;
206 let place1 = args.get(1).and_then(|arg1| arg1.node.place());
207 Some((place0, place1))
208 } else {
209 None
210 }
211}
212
213#[derive(PartialEq, Eq, Debug, Clone, Copy)]
214enum DependenceKind {
215 Control,

Callers 1

atomic_uses_influencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected