Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-30797

Member Initializer List syntax error warning

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • Qt Creator 14.0.2
    • Qt Creator 11.0.2, Qt Creator 13.0.2
    • C/C++/Obj-C++ Support
    • None
    • macOS
    • dceabc0e0 (14.0)

    Description

      when I type follower code:

       

      class A
      {
        public:
          A()
          {
            printf("A()\n");
          }
      };
      class B
      {
        public:
          B(int v)
          {
            printf("B()\n");
          }
      };
      class R
      {
        public:
          R(): a(), b(1)
          {
            printf("R()\n");
          }
          A a;
          B b;
      }; 

      The clazy check show the warning as following:

      delete the `a()`, the warning disappears.

      The reason looks like clazy cannot analysis empty param list of members in Member Initializer List.

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-30797
          # Subject Branch Project Status CR V

          Activity

            People

              kandeler Christian Kandeler
              zhangcd cd z
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes