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

Incorrect static data member of a struct highlighting

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 7.0.0
    • C/C++/Obj-C++ Support
    • None
    • Kubuntu 21.10 x86-64
    • Linux/X11

    Description

      In the following code piece, my_const is not highlighted as a global constant (as my_global_const). It is also not colored as a non-static data member.

      struct my_struct
      {
      	unsigned int my_var = 0u;
      	static constexpr unsigned int my_const = 1u;
      };
      
      static constexpr unsigned int my_global_const = 2u;
      

      This is with clangd enabled. With clangd disabled, my_const and my_global_const are both colored the same way, as namespace-scope variables, which is the expected behavior.

      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:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes