Files
cppcourse/.agents/skills/cpp-code-review/references/false-positives.md
T
porterskyandQwen 3.8 27B 38473eb734 docs(agents): add cpp-code-review skill
Add a code review skill with reference files for memory safety,
concurrency, correctness idioms, false positives, cppreference
lookup, and report format. Move the coding conventions from
AGENTS.md into the skill's project-style reference so reviews
enforce them.

Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
2026-10-06 08:02:45 +02:00

821 B

Avoiding False Positives

Before reporting, check:

  • A raw pointer that is non-owning (an observer) is fine; only owning raw pointers are a problem.
  • Unsigned integer overflow is defined (wraps); only signed overflow is UB.
  • std::move on a const object or a return of a local is a pessimization/no-op, not a bug.
  • Copy elision: returning a local by value is fine; don't suggest std::move on return.
  • Static locals are initialized thread-safely since C++11.
  • Code guarded by #ifdef or feature macros may target a different standard or platform.
  • If the compiler (with warnings enabled) would reject or warn on it, defer to the compiler.
  • If you're unsure a construct is UB, look it up on cppreference before reporting.

If still unsure, mark the finding as Question instead of Issue.