MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / AddExtended

Method AddExtended

LifetimeTracker.cpp:34–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32//-----------------------------------------------------------------------------
33
34void LifetimeTracker::AddExtended(const VarDecl* decl, const ValueDecl* extending)
35{
36 // Search for the extending VarlDecl which is already in `objects`. Insert this decl _after_
37 if(auto it = std::ranges::find_if(objects, [&](const auto& e) { return e.item == extending; });
38 it != objects.end()) {
39 const auto scope = (*it).scope;
40 objects.insert(std::next(it), {decl, LifetimeEntry::FuncStart::No, scope});
41 }
42}
43//-----------------------------------------------------------------------------
44
45void LifetimeTracker::Add(const VarDecl* decl)

Callers 1

LifetimeAddExtendedMethod · 0.80

Calls 2

nextFunction · 0.85
endMethod · 0.45

Tested by

no test coverage detected