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

Enclosing function is sometimes incorrectly determined (Document::functionAt)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 7.0.1
    • C/C++/Obj-C++ Support
    • None

      Document::lastVisibleSymbolAt is looking for last visible symbol at current location.

      If this last visible symbol is a lambda, Document::functionAt will consider it as a Function, and will return this lambda as enclosing function.

      This algorithm is not working correctly if we're trying to find enslosing function for a local variable which is declared immediately after a lambda declaration.

      In the attached screenshot, I've marked current symbol attributes in red, and result of  Document::functionAt in green

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

            kandeler Christian Kandeler
            ihorodessa Ihor Ivlev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change