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

Method EndScope

LifetimeTracker.cpp:151–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149//-----------------------------------------------------------------------------
150
151bool LifetimeTracker::EndScope(OutputFormatHelper& ofm, bool coveredByReturn)
152{
153 RETURN_FALSE_IF(not GetInsightsOptions().ShowLifetime or objects.empty())
154
155 bool ret{};
156
157 if(not coveredByReturn) {
158 for(auto& e : llvm::reverse(objects)) {
159 if(e.scope != scopeCounter) {
160 break;
161 }
162
163 if(nullptr == e.item) {
164 break;
165 }
166
167 InsertDtorCall(e.item, ofm);
168 ret = true;
169 }
170 }
171
172 removeTop();
173
174 return ret;
175}
176//-----------------------------------------------------------------------------
177
178} // namespace clang::insights

Callers 2

EndLifetimeScopeMethod · 0.80
InsertArgMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected