https://bugs.kde.org/show_bug.cgi?id=419423

            Bug ID: 419423
           Summary: Incorrect syntax-highlighting for subscript operator
                    of C++ containers
           Product: kdevelop
           Version: 5.5.0
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: kogiokkaf...@gmail.com
  Target Milestone: ---

Created attachment 127110
  --> https://bugs.kde.org/attachment.cgi?id=127110&action=edit
Incorrect syntax-highlighting of operator[] (dark theme)

SUMMARY
The square brackets of operator[] of C++ containers have different
syntax-highlighting colors.

STEPS TO REPRODUCE
Example snippet:
<main.cc>
----------
#include <array>
#include <map>
#include <vector>

int
main()
{
  std::array<std::array<float, 3>, 3> mat{
    { { 1.f, 0.f, 0.f }, { 0.f, 1.f, 0.f }, { 0.f, 0.f, 1.f } }
  };
  std::vector<float> vec{ 1.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 1.f };

  std::map<int, int> m{
    { 1, 1 },
    { 2, 4 },
    { 3, 9 },
  };

  printf("%.3f, %.3f, %.3f\n", mat[0][0], mat[1][1], mat[2][2]);
  printf("%.3f, %.3f, %.3f\n", vec[0 * 3 + 0], vec[1 * 3 + 1], vec[2 * 3 + 2]);
  printf("%d, %d, %d\n", m[1], m[2], m[3]);
  return 0;
}

OBSERVED RESULT
See the screenshots in the attachment. (Looks more obvious in dark themes.)

EXPECTED RESULT
The square brackets of operator[] should have the same color.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to