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

Code model fails to see friend functions inside a class body

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • Qt Creator 8.0.0-beta1
    • C/C++/Obj-C++ Support
    • None

    Description

      Built from commit: 9fb8b4af8158d8b560ca8f4010469b0fbaf10520
      Using LLVM/Clang 14.0.5

      Testcase:

      struct S
      {
          int i;
          bool operator==(const S &other) const { return i == other.i; }
          friend bool operator!=(S s1, S s2) { return s1.i != s2.i; }
      };
      

      If you place the cursor in that friend function, the locator at the top only displays "S".

      It's also missing from the drop-down:

      And from the Ctrl+k, . locator:

      Attachments

        1. image-2022-07-01-20-10-39-335.png
          58 kB
          Thiago Macieira
        2. image-2022-07-01-20-12-12-933.png
          26 kB
          Thiago Macieira
        3. screenshot-1.png
          104 kB
          Thiago Macieira

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              thiago Thiago Macieira
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes