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

Code model fails to see friend functions inside a class body

XMLWordPrintable

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

      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:

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes