Skip to content

M5-3-3: triggers on bitwise & operator #363

@anthony-williams-woven

Description

@anthony-williams-woven

Affected rules

  • M5-3-3

Description

M5-3-3 reports that "Unary & operator shall not be overloaded" on instances of the binary & operator

Example

constexpr byte operator&(const byte lhs, const byte rhs) noexcept {
  return to_byte(to_underlying(lhs) & to_underlying(rhs));
}

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day 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