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

Clangd + Outline::Function declaration —> wrong function declaration with return reference or pointer type.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P2: Important
    • Resolution: Done
    • Qt Creator 6.0.0, Qt Creator 6.0.1, Qt Creator 6.0.2, Qt Creator 7.0.0, Qt Creator 7.0.1, Qt Creator 7.0.2
    • Qt Creator 8.0.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Windows
    • c6c919e671 (qt-creator/qt-creator/master) c6c919e671 (qt-creator/qt-creator/8.0)

    Description

      If Tools/Options.../C++/Clangd option is On we have next trouble:
      For functions which return type is: either reference, rvalue reference or pointer, — it's declarations does not correctly appears in the top and right side editor's panes! (see attached screenshots)

      To avoid this problem I use C++ keyword "using" to define type alias:
      template<typename T> using Pointer = T *;
      template<typename T> using Reference = T&;

      After that I have correct function outlines! (see attached screenshots)

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            dsso Alexander Bychkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes