Skip to content

A3-9-1: Incorrectly alerts on template functions instantiated with fix-width integers #540

Open
@rvermeulen

Description

@rvermeulen

Affected rules

  • cpp/autosar/variable-width-integer-types-used

Description

Template instantiations store the template argument after type definitions have been resolved.
This results in argument types with variable width integer types even though the template is instantiated with fixed-width integers.

Additionally, we want to change the location of the alerts in case of template instantiations to the location where the template is instantiated because that is where the rule violation happens.

Example

template <typename T>
void foo(T value) { ... }
}

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressImpact-MediumStandard-AUTOSARfalse positive/false negativeAn issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding Standards

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions