Skip to content

Commit 6d56aea

Browse files
committed
Fix debug assertion in visitLambdaExpr
1 parent 3b5d22f commit 6d56aea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ class UncountedLambdaCapturesChecker
214214
continue;
215215
bool hasProtectThis = false;
216216
for (const LambdaCapture &OtherCapture : L->captures()) {
217+
if (!OtherCapture.capturesVariable())
218+
continue;
217219
if (auto *ValueDecl = OtherCapture.getCapturedVar()) {
218220
if (protectThis(ValueDecl)) {
219221
hasProtectThis = true;

0 commit comments

Comments
 (0)