Skip to content

Commit 12578b2

Browse files
Update checkother.cpp
1 parent a456279 commit 12578b2

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->scope() && var->scope()->type == ScopeType::eLambda)
1872+
if (var->isArgument() && var->scope() && var->scope()->type == ScopeType::eLambda)
18731873
continue;
18741874
const Token* const nameTok = var->nameToken();
18751875
if (tok == nameTok && var->isLocal() && !astIsRangeBasedForDecl(nameTok)) {

0 commit comments

Comments
 (0)