A20-8-5
-A20-8-6
: Cannot create a smart pointer with nullptr
value
#721
Labels
Difficulty-Low
A false positive or false negative report which is expected to take <1 day effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-Low
Standard-AUTOSAR
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
A20-8-5
:cpp/autosar/make-unique-not-used-to-construct-object-owned-by-unique-ptr
A20-8-6
:cpp/autosar/make-shared-not-used-to-construct-object-owned-by-shared-ptr
Description
A20-8-5
triggers when initializing anunique_ptr
tonullptr
.A20-8-6
triggers when initializing anshared_ptr
tonullptr
.Initializing a smart pointer with a
nullptr
value can be however necessary in some specific cases.Example
The text was updated successfully, but these errors were encountered: