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

S1172: fix false-positives with virtual functions in template classes

    Details

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

      Description

      template<typename T> class C {
      public:
        virtual void f(int a, int b) {
          (void)a;
          (void)b;
        }
        virtual ~C();
      };template<typename T> class D : public C<T> {
      public:
        void f( int a, int b) override { // FP :22 :23 S1172:unused parameter 'b'
          (void)a;
        }
        ~D() override;
      };
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abbas.sabra Abbas Sabra
                Reporter:
                geoffray.adde Geoffray Adde
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: