Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/tools/clang-tidy/test/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 500 B image not shown  

Quelle  bugprone-unused-raii.cpp   Sprache: C

 
// https://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-raii.html

struct scoped_lock
{
  scoped_lock() {}
  ~scoped_lock() {}
};

#define SCOPED_LOCK_MACRO(m) scoped_lock()

struct trivial_scoped_lock
{
  trivial_scoped_lock() {}
};

scoped_lock test()
{
  scoped_lock(); // misc-unused-raii warning!

  SCOPED_LOCK_MACRO(); // no warning for macros

  trivial_scoped_lock(); // no warning for trivial objects without destructors

  return scoped_lock(); // no warning for return values
}

Messung V0.5
C=95 H=89 G=91

¤ Dauer der Verarbeitung: 0.20 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.