github / github/codeql

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

オープン
#7,035 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る
acknowledged C++ false-positive not security
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

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`.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。