A0-1-1
: initialization of constexpr used as NTTP is detected as useless assignment
#728
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
Standard-AUTOSAR
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
A0-1-1
(useless assignment)Description
Constant expression used as non-type template parameter (NTTP) produces useless-assignment false positive. It can be reproduced with integer NTTP.
Example
Both definitions of
one
andthirteen
are alerted as unused on querycpp/autosar/src/rules/A0-1-1/UselessAssignment.ql
.The text was updated successfully, but these errors were encountered: