We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a456279 commit 12578b2Copy full SHA for 12578b2
1 file changed
lib/checkother.cpp
@@ -1869,7 +1869,7 @@ void CheckOther::checkConstPointer()
1869
continue;
1870
if (!var->isLocal() && !var->isArgument())
1871
1872
- if (var->scope() && var->scope()->type == ScopeType::eLambda)
+ if (var->isArgument() && var->scope() && var->scope()->type == ScopeType::eLambda)
1873
1874
const Token* const nameTok = var->nameToken();
1875
if (tok == nameTok && var->isLocal() && !astIsRangeBasedForDecl(nameTok)) {
0 commit comments