Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A8-4-7: Exclude user defined operators from this rule #397

Closed
lcartey opened this issue Oct 5, 2023 · 0 comments · Fixed by #498
Closed

A8-4-7: Exclude user defined operators from this rule #397

lcartey opened this issue Oct 5, 2023 · 0 comments · Fixed by #498
Assignees
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@lcartey
Copy link
Collaborator

lcartey commented Oct 5, 2023

Affected rules

  • A8-4-7

Description

User defined operators are expected to conform to a particular prototype, and should not be flagged by this rule.

We should also consider whether there are any other examples of fixed prototype functions that might be erroneously reported by theis rule.

Example

class some_base_class {
 public:
  constexpr some_base_class() noexcept = default;
  constexpr std::size_t size() const noexcept { return 0; }

 protected:
...
  some_base_class& operator=(const some_base_class&) = default; // error here
};
@lcartey lcartey added Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards labels Oct 5, 2023
@knewbury01 knewbury01 self-assigned this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

Successfully merging a pull request may close this issue.

2 participants