Skip to content

RULE-6-8-4: FN for *this returning member #1122

Description

@knewbury01

Affected rules

  • RULE-6-8-4

Description

does not find pointer dereferences for this in member functions.

likely need to extend MembersReturningObject to use getASubobjectAccessOfPointee but right now that duplicates results with MembersReturningSubObject unless other checks are applied to make sure the return is an address or reference

getASubobjectAccessOfPointee would also need to be more thoroughly tested in this case

Example

struct A {
  int a;
  A &getstructbad2() { return *this; } // NON_COMPLIANT[FALSE_NEGATIVE]
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Lowfalse positive/false negativeAn issue related to observed false positives or false negatives.false-negativeAn issue representing a false negative report.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions