[analyzer] Invalidate static locals when escaping lambdas
ClosedPublic

Authored by george.karpenkov on Mon, Aug 6, 3:47 PM.

Details

Summary

Lambdas can affect static locals even without an explicit capture.

rdar://39537031

Diff Detail

Repository
rL LLVM
george.karpenkov retitled this revision from Invalidate static locals when escaping lambdas to [analyzer] Invalidate static locals when escaping lambdas.Tue, Aug 7, 11:59 AM
NoQ accepted this revision.Tue, Aug 7, 12:15 PM

I think we should also add the test with the original problem: where the lambda is being called directly but isn't inlined due to call stack depth limit. We could artificially set the limit in the RUN: line to an explicit small value to emulate the desired behavior.

This revision is now accepted and ready to land.Tue, Aug 7, 12:15 PM
This revision was automatically updated to reflect the committed changes.