Skip to content

M9-3-3: Identify indirect assignment of member data #381

Closed
@lcartey

Description

@lcartey

Affected rules

  • M9-3-3

Description

Improve the rule to detect assignment into references or pointers into member data.

Example

In this example we see a member function which modifies a member variable called values_, by iterating through and taking a reference to each element.

template <typename U = T>
void fill(const T& val) {
    for (auto& elem : values_) {
      elem = val;
    }
  }

Metadata

Metadata

Assignees

Labels

Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressImpact-MediumPhase IIfalse 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