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

QtCreator crashes when the currently edited file contains the pattern "enum class operator class_name"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • Qt Creator 3.6.0-rc1
    • Qt Creator 3.5.0, Qt Creator 3.5.1, Qt Creator 3.6.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • 10e947f65f19ec61e29afbaf167bf3439b5bea11

      If a c++ source or header file contains following code:

      enum class operator A
      

      and default c++ code model is in use, QtCreator will crash when trying to use the code completion.

      Problem is caused by faulty parsing. After enum keyword (followed by "class"), only valid next token is an identifier, but code model parses "operator A" as a conversion operator, which Bind doesn't handle properly and produces garbage symbols. When code completion is used, broken symbols crash the editor.

        For Gerrit Dashboard: QTCREATORBUG-15341
        # Subject Branch Project Status CR V

            kosjar Nikolai Kosjar
            latexi95 Lassi Hämäläinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes