-
Notifications
You must be signed in to change notification settings - Fork 76
M0-1-9: constexpr used in array size is detected as dead code #678
Copy link
Copy link
Closed
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Metadata
Metadata
Assignees
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
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 intis 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