Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`A15-4-2`: Ignore elided calls when calculating the exception graph

オープン
#158 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

@lcartey がすでに取り組んでいます。

2024年1月14日 から。

評価

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

説明

Difficulty-Medium false positive/false negative Impact-High Standard-AUTOSAR top-25-fps user-report
Affected rules
  • A15-4-2
Description

Copy elision allows the compiler to omit copy and move construction in certain circumstances. Some of these circumstances are considered "mandatory" - i.e. the compiler must omit the explicit construction - and in those circumstances copy and move constructors may never be called.

If you have move/copy constructors which are never expected to be called because they are always elided, you may decide to throw an exception from the copy/move constructor to enforce that it is only used in circumstances where the elision occurs. As our call graph does not currently reflect the mandatory elision of functions, this can cause false positives.

Example
// `foo` is only used in circumstances where it is elided, so this exception is never thrown in practice
constexpr foo(const foo&) : dummy() {
  throw some_bad_exception();
};
主要言語
CodeQL
スター
227
フォーク
82
平均マージ
6日 7時間
マージ済み PR(30日)
9

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/codeql-coding-standards のほかの issue

github/codeql-coding-standards の issue をすべて見る

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

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