Skip to content

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

@knewbury01

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]
};

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions