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

Incorrect output parameter highlighting in __builtin_expect

    XMLWordPrintable

Details

    • Linux/X11
    • 9146ce4625 (qt-creator/qt-creator/7.0) 9146ce4625 (qt-creator/qt-creator/master) 9146ce4625 (qt-creator/qt-creator/qds-3.3) 9146ce4625 (qt-creator/tqtc-qt-creator/7.0)

    Description

      The variable in __builtin_expect condition in the following code sample is highlighted as an output parameter:

      class my_class_base
      {
      protected:
      	int value;
      };
      
      template< typename T >
      class my_class :
      	public my_class_base
      {
      	bool foo()
      	{
      		if (__builtin_expect(value == 10, 1))
      			return true;
      		return false;
      	}
      };
      

      This happens with clangd enabled.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            lastique Andrey Semashev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes