A5-16-1
: Constructing std::string
is considered as sub-expression in ternary operation
#754
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-Medium
Standard-AUTOSAR
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
A5-16-1
:cpp/autosar/ternary-conditional-operator-used-as-sub-expression
Description
When initializing a string inside a ternary expression,
A5-16-1
error is triggered.I tried with
std::uint32_t
and with aclass
, and the error was not triggered.Example
The text was updated successfully, but these errors were encountered: