Skip to content

Commit 015da40

Browse files
Update checkstl.cpp
1 parent 9b3b160 commit 015da40

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/checkstl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,9 +1986,11 @@ static bool isc_strCall(const Token* tok, const Library::Container* container)
19861986

19871987
static bool isc_strConcat(const Token* tok)
19881988
{
1989-
if (!tok->isBinaryOp() || !Token::simpleMatch(tok, "+"))
1989+
if (!tok->isBinaryOp() || !Token::Match(tok, "+|+="))
19901990
return false;
19911991
for (const Token* op : { tok->astOperand1(), tok->astOperand2() }) { // NOLINT(readability-use-anyofallof)
1992+
if (tok->isAssignmentOp() && astIsLHS(op))
1993+
continue;
19921994
const Token* sibling = op->astSibling();
19931995
if (!sibling->valueType())
19941996
continue;

0 commit comments

Comments
 (0)