Skip to content

M8-0-1: Exclude compiler generated statements for range based for loops #309

Closed
@lcartey

Description

@lcartey

Affected rules

  • M8-0-1
  • A7-1-5

Description

The range based for loop is implemented in our database schema with reference to compiler generated AST elements, introducing compiler variables such as __range, __begin and __end. These compiler generated variables are flagged as contravening a number of the C++ rules, but should be excluded.

Example

for (const auto r : foo)

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.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