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

Method Return

LifetimeTracker.cpp:112–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110//-----------------------------------------------------------------------------
111
112bool LifetimeTracker::Return(OutputFormatHelper& ofm)
113{
114 RETURN_FALSE_IF(not GetInsightsOptions().ShowLifetime or objects.empty())
115
116 bool ret{};
117
118 for(OnceTrue needsSemi{}; auto& e : llvm::reverse(objects)) {
119 if(LifetimeEntry::FuncStart::Yes == e.funcStart) {
120 break;
121 }
122
123 if(nullptr == e.item) {
124 continue;
125 }
126
127 if(needsSemi) {
128 CodeGeneratorVariant cg{ofm};
129 cg->InsertArg(mkNullStmt());
130 }
131
132 InsertDtorCall(e.item, ofm);
133 ret = true;
134 }
135
136 return ret;
137}
138//-----------------------------------------------------------------------------
139
140void LifetimeTracker::removeTop()

Callers 1

InsertArgMethod · 0.80

Calls 3

mkNullStmtFunction · 0.85
emptyMethod · 0.45
InsertArgMethod · 0.45

Tested by

no test coverage detected