<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Completion provides no OVERLOAD/CXCursor_OverloadCandidate items for static member functions"
   href="https://bugs.llvm.org/show_bug.cgi?id=33904">33904</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Completion provides no OVERLOAD/CXCursor_OverloadCandidate items for static member functions
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nikolai.kosjar@qt.io
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat -n $FILE
     1  struct WithStaticFunctions
     2  {
     3      static void f();
     4      static void f(int);
     5  };
     6  
     7  struct WithNonStaticFunctions
     8  {
     9      void f();
    10      void f(int);
    11  };
    12  
    13  int main()
    14  {
    15      {
    16          WithStaticFunctions foo;
    17          foo.f(); // Complete after '(' (17:15) - ops
    18      }
    19  
    20      {
    21          WithNonStaticFunctions foo;
    22          foo.f(); // Complete after '(' (22:15) - fine
    23      }
    24  }


For static member functions, no OVERLOAD/CXCursor_OverloadCandidate items are
provided:

$ clang -fsyntax-only -std=c++1y -Xclang -code-completion-at -Xclang
$FILE:17:15 $FILE
...
COMPLETION: WithStaticFunctions : WithStaticFunctions(<#const
WithStaticFunctions &#>)
COMPLETION: WithStaticFunctions : WithStaticFunctions(<#WithStaticFunctions
&&#>)
$

...but for non-static member functions, they are:
$ clang -fsyntax-only -std=c++1y -Xclang -code-completion-at -Xclang
$FILE:22:15 $FILE
...
COMPLETION: WithStaticFunctions : WithStaticFunctions()
COMPLETION: WithStaticFunctions : WithStaticFunctions(<#const
WithStaticFunctions &#>)
COMPLETION: WithStaticFunctions : WithStaticFunctions(<#WithStaticFunctions
&&#>)
OVERLOAD: [#void#]f()
OVERLOAD: [#void#]f(<#int#>)
$


For the static member functions case, there should be OVERLOAD items, too.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>