M0-1-9
: constexpr used in array size is detected as dead code
#678
Labels
Difficulty-Medium
A false positive or false negative report which is expected to take 1-5 days effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-Medium
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
M0-1-9
(dead code)Description
Integer constant expression used for the size in an array declaration produces dead-code false positive. In other words, the e.g.
constexpr int
is not dead code because it is used to define the array size. This is contrast with when the size is (static) const, which does not produce the alert.Example
The text was updated successfully, but these errors were encountered: