Created attachment 142163 [details] lambda-in-connect-false-positive.cpp SUMMARY lambda-in-connect false positive when a capturing lambda is nested inside the connected lambda. STEPS TO REPRODUCE 1. Run clazy on attached file lambda-in-connect-false-positive.cpp OBSERVED RESULT lambda-in-connect-false-positive.cpp(8,4): warning: captured local variable by reference might go out of scope before lambda is called [-Wclazy-lambda-in-connect] foo++; EXPECTED RESULT No warning. The connected lambda is not capturing foo (only the nested lambda is), so there's no risk. SOFTWARE/OS VERSIONS Windows: 21H1 Qt Version: Qt 5.15.2 clazy_v1.8-msvc2019.zip as build by KDAB (File lambda-in-connect.cpp has no commits between 1.8 and master). ADDITIONAL INFORMATION If the connected lambda is capturing by reference something other than foo, the warning should still not appear.