Skip to content

A7-1-2: Exclude variables in uninstantiated templates and compiler generated variables #607

Closed
@lcartey

Description

@lcartey

Affected rules

  • A7-1-2

Description

Uninstantiated templates may not include the full set of types or call targets for function calls, which can cause false positives for this query.

Similarly, compiler generated variables cannot be addressed by the end user and should be filtered out.

Example

template <typename T> T* init(T** t) { }

template <typename T> T* init() {
 T* t = nullptr; // COMPLIANT - initialized below
 init(&t); // Init is ignored in uninitialized template
 return t;
}

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

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions