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

Details

    • Bug
    • Resolution: Done
    • 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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: