Skip to content

Commit 8bf72f5

Browse files
Update checkother.cpp
1 parent ce9e536 commit 8bf72f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkother.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ void CheckOther::checkConstPointer()
18691869
continue;
18701870
if (!var->isLocal() && !var->isArgument())
18711871
continue;
1872-
if (var->isArgument() && var->scope() && var->scope()->type == ScopeType::eLambda)
1872+
if (var->isArgument() && var->scope() && var->scope()->type == ScopeType::eLambda && !Token::simpleMatch(var->scope()->bodyEnd, "} ("))
18731873
continue;
18741874
const Token* const nameTok = var->nameToken();
18751875
if (tok == nameTok && var->isLocal() && !astIsRangeBasedForDecl(nameTok)) {

0 commit comments

Comments
 (0)