-
Notifications
You must be signed in to change notification settings - Fork 77
A2-10-5: Do not consider variable template instantiations as a reuse of the name #33
Copy link
Copy link
Closed
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day 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-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day 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
A2-10-5Description
A2-10-5requires that non-member objects are given a unique name (irrespective of scope). However, the query does not currently account for variable templates, which are represented as multiple different variables in the CodeQL C/C++ model.I think the most straightforward fix here is to exclude the variable template instantiations, and only use the un-instantiated template, e.g.:
Example