github / github/codeql

LGTM.com - false positive for move and copy assignment operators not returning *this (C++)

Aberta
#7,035 2 comentários 2 reações 0 responsáveis Ver no GitHub
acknowledged C++ false-positive not security
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

The error is reported for these operators when `*this` is returned indirectly via a function call. For example:

https://lgtm.com/projects/g/oknenavin/cxon/snapshot/9103621a01a81595999681a97870d8930d56aa58/files/src/cxon/lang/cbor/node/node.hxx?sort=name&dir=ASC&mode=heatmap#xc6e83398218bd018:1

we have:
``` c++
return value::move_assign(*this, std::forward(o));
```
where `value::move_assign` returns its first argument, which is `*this`.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.