Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#158 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@lcartey ci sta già lavorando.

Dal 14/1/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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();
};
Lingua principale
CodeQL
Stelle
227
Fork
82
Merge medio
6g 7h
PR unite (30g)
9

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/codeql-coding-standards

Tutte le issue di github/codeql-coding-standards

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.