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

S1185: Fix false-positives with "final"

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.6
    • Fix Version/s: 6.7
    • Component/s: C++, Rules
    • Labels:
      None

      Description

      The following example from the documentation did not work, an erroneously reported an issue (and was removed):

      class Base {
      public:
        void f();
      };
      
      class Derived : public Base {
      public:
        void f() final { // final
          Base::f();
        }
      };
      

      We should handle this case, and update the RSPEC:

      Changing the visibility of the function in the derived class or making it final

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: