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

Incorrect preprocessor keyword highlighting in strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 7.0.2
    • Fix Version/s: Qt Creator 8.0.0-beta1
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Kubuntu 22.04
    • Platform/s:
      Linux/X11
    • Commits:
      b1e73ca45d (qt-creator/qt-creator/master) b1e73ca45d (qt-creator/qt-creator/8.0)

      Description

      In the following code snippet:

      #define FOO 1
      #define BAR 1
      
      const char text[] =
      #if defined(FOO)
      			"Hello"
      #endif
      #if defined(BAR)
      			"World"
      #endif
      ;
      

      the first #endif and second #if defined are highlighted as string literals instead of preprocessor keywords.

      clangd is enabled.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kandeler Christian Kandeler
              Reporter:
              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