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

Member Initializer List syntax error warning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated 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)

      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.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes