Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-2036

S3252: Allow accessing static member when the member is not a variable

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 6.0
    • Component/s: Rules
    • Labels:
      None

      Description

      Rule https://rules.sonarsource.com/cpp/RSPEC-3252 reports all cases when we access a static member in a base class by qualifying if with a derived class.

      But when the member is not a non-const variable, there is not risk of confusion, and indeed using the base class qualifier might lead to bad code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              loic.joly Loïc Joly
              Reporter:
              loic.joly Loïc Joly
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: