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

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

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change