Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A0-1-1:auto local variables in uninstantiated templates are reported as unused #230

Closed
Assignees
lcartey
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Highfalse positive/false negativeAn issue related to observed false positives or false negatives.top-25-fpsuser-reportIssue reported by an end user of CodeQL Coding Standards
@lcartey

Description

@lcartey

Affected rules

  • A0-1-1

Description

Where anauto variable is declared in a template function or class, the copy of the variable in the uninstantiated template may be considered "unused", even though it is considered used in at least one instantiation.

Example

#include<vector>template<typename T>voidtest_range_based_for_loop_template() {  std::vector<A> values_;for (auto &elem : values_) {// COMPLIANT - should not report either elem or//             the compiler generated (__range)//             variable in the uninstantiated//             template    elem;  }}// Instantiate the templatevoidtest_template() { test_range_based_for_loop_template<A>(); }

Metadata

Metadata

Assignees

Labels

Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Highfalse positive/false negativeAn issue related to observed false positives or false negatives.top-25-fpsuser-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


    [8]ページ先頭

    ©2009-2025 Movatter.jp