Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleGenerated Content

This page is automatically generated from the "Automated Detection" sections in the individual guidelines. Do not modify this page directly.

...

was automatically generated and should not be edited.

The information on this page was provided by outside contributors and has not been verified by SEI CERT.

Include Page
cplusplus:

...

LDRA_V
cplusplus:LDRA_V

Checker

Guideline

1 J EXP54-CPP. Do not access an object outside of its lifetime
1 Q EXP50MSC50-CPP. Do not use std::rand() for generating pseudorandom numbersdepend on the order of evaluation for side effects
112 D MEM51-CPP. Properly deallocate dynamically allocated resources
122 S ERR50-CPP. Do not abruptly terminate the program
133 S EXP52DCL01-CPP. Do not reuse variable names in subscopesDCL04rely on side effects in unevaluated operands
134 S EXP50-CPP. Do not declare more than one variable per declarationDCL06-CPP. Use meaningful symbolic constants to represent literal values in program logicEXP00-CPP. Use parentheses for precedence of operationEXP02-CPP. Be aware of the short-circuit behavior of the logical AND and OR operatorsFIO00-CPP. Take care when creating format stringsFIO01-CPP. Be careful using functions that use file names for identificationFLP05-CPP. Convert integers to floating point for floating point operationsINT07-CPP. Use only explicitly signed or unsigned char type for numeric valuesINT09-CPP. Ensure enumeration constants map to unique valuesINT11-CPP. Take care when converting from pointer to integer or integer to pointerINT13-CPP. Use bitwise operators only on unsigned operandsMEM11-CPP. Allocate and free memory in the same module, at the same level of abstractionMSC02-CPP. Avoid errors of omissionMSC03-CPP. Avoid errors of additionMSC07-CPP. Detect and remove dead codeMSC08-CPP. Functions should validate their parametersMSC09-CPP. Character encoding: Use subset of ASCII for safetyMSC10-CPP. Character encoding: UTF8-related issuesMSC13-CPP. Detect and remove unused valuesPRE01-CPP. Use parentheses within macros around parameter namesPRE02-CPP. Macro replacement lists should be parenthesizedPRE06-CPP. Enclose header files in an inclusion guardPRE07-CPP. Avoid using repeated question marksSTR03-CPP. Do not inadvertently truncate a null-terminated character array
1 QEXP50-CPP. Do not depend on the order of evaluation for side effects
134 SEXP50-CPP. Do not depend on the order of evaluation for side effects
35 DEXP50-CPP. Do not depend on the order of evaluation for side effects
51 DMEM50-CPP. Do not access freed memory
75 DFIO21-CPP. Do not simultaneously open the same file multiple times
depend on the order of evaluation for side effects
169 S EXP57-CPP. Do not cast or delete pointers to incomplete classes
2 D MSC52-CPP. Value-returning functions must return a value from all exit paths
203 S EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
206 S OOP53-CPP. Write constructor member initializers in the canonical order
218 S DCL51-CPP. Do not declare or define a reserved identifier
219 S DCL51-CPP. Do not declare or define a reserved identifier
232 S MEM51-CPP. Properly deallocate dynamically allocated resources
236 S MEM51-CPP. Properly deallocate dynamically allocated resources
239 S MEM51-CPP. Properly deallocate dynamically allocated resources
242 S EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
286 S DCL59-CPP. Do not define an unnamed namespace in a header file
286 S DCL60-CPP. Obey the One-Definition Rule
287 S DCL60-CPP. Obey the One-Definition Rule
296 S DCL53-CPP. Do not write syntactically ambiguous declarations
303 S OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
344 S EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
35 D EXP50-CPP. Do not depend on the order of evaluation for side effects
36 S MSC52-CPP. Value-returning functions must return a value from all exit paths
407 S MEM51-CPP. Properly deallocate dynamically allocated resources
41 S DCL50-CPP. Do not define a C-style variadic function
42 D EXP54-CPP. Do not access an object outside of its lifetime
43 S ERR52-CPP. Do not use setjmp() or longjmp()
437 S CTR54-CPP. Do not subtract iterators that do not refer to the same container
438 S CTR54-CPP. Do not subtract iterators that do not refer to the same container
44 S OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
44 S MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
45 D CTR50-CPP. Guarantee that container indices and iterators are within the valid range
45 D MEM52-CPP. Detect and handle memory allocation errors
453 S DCL57-CPP. Do not let exceptions escape from destructors or deallocation functions
467 S OOP50-CPP. Do not invoke virtual functions from constructors or destructors
469 S MEM51-CPP. Properly deallocate dynamically allocated resources
47 S CTR50-CPP. Guarantee that container indices and iterators are within the valid range
470 S MEM51-CPP. Properly deallocate dynamically allocated resources
476 S CTR50-CPP. Guarantee that container indices and iterators are within the valid range
483 S MEM50-CPP. Do not access freed memory
483 S MEM51-CPP. Properly deallocate dynamically allocated resources
484 S MEM50-CPP. Do not access freed memory
484 S MEM51-CPP. Properly deallocate dynamically allocated resources
485 S MEM51-CPP. Properly deallocate dynamically allocated resources
489 S CTR50-CPP. Guarantee that container indices and iterators are within the valid range
489 S STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
50 D ERR57-CPP. Do not leak resources when handling exceptions
512 S DCL59-CPP. Do not define an unnamed namespace in a header file
527 S ERR51-CPP. Handle all exceptions
527 S ERR56-CPP. Guarantee exception safety
53 D EXP53-CPP. Do not read uninitialized memory
53 D EXP54-CPP. Do not access an object outside of its lifetime
54 S EXP52-CPP. Do not rely on side effects in unevaluated operands
541 S ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
549 S ERR53-CPP. Do not reference base classes or class data members in a constructor or destructor function-try-block handler
554 S EXP57-CPP. Do not cast or delete pointers to incomplete classes
556 S ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
56 D ERR55-CPP. Honor exception specifications
56 D ERR56-CPP. Guarantee exception safety
565 S EXP54-CPP. Do not access an object outside of its lifetime
567 S CTR55-CPP. Do not use an additive operator on an iterator if the result would overflow
567 S CTR56-CPP. Do not use pointer arithmetic on polymorphic objects
580 S DCL51-CPP. Do not declare or define a reserved identifier
597 S MEM54-CPP. Provide placement new with properly aligned pointers to sufficient storage capacity
6 D DCL56-CPP. Avoid cycles during initialization of static objects
618 S EXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation
631 S EXP53-CPP. Do not read uninitialized memory
64 S MEM51-CPP. Properly deallocate dynamically allocated resources
64 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
652 S EXP53-CPP. Do not read uninitialized memory
66 X CTR50-CPP. Guarantee that container indices and iterators are within the valid range
66 X STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator
67 D 9 S EXP50-CPP. Do not depend on the order of evaluation for side effects
68 X CTR50Can detect violations of this recommendation.MEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated typeGuarantee that container indices and iterators are within the valid range
69 D EXP53Can detect violations of this recommendation.MEM09-CPP. Do not assume memory allocation routines initialize memory
Can detect violations of this recommendation.MSC04-CPP. Use comments consistently and in a readable fashion
Can detect violations of this recommendation.MSC12-CPP. Detect and remove code that has no effect
Can detect violations of this recommendation.PRE00-CPP. Avoid defining macros
Can detect violations of this recommendation.PRE03-CPP. Prefer typedefs to defines for encoding types
Can detect violations of this recommendation.PRE04-CPP. Do not reuse a standard header file name
Can detect violations of this recommendation???EXP19-CPP. Do not perform assignments in conditional expressions
ImplementedCTR01-CPP. Do not apply the sizeof operator to a pointer when taking the size of an array

...