[llvm-bugs] [Bug 33904] New: Completion provides no OVERLOAD/CXCursor_OverloadCandidate items for static member functions
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 24 02:43:46 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33904
Bug ID: 33904
Summary: Completion provides no
OVERLOAD/CXCursor_OverloadCandidate items for static
member functions
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nikolai.kosjar at qt.io
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
$ 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170724/267abe52/attachment-0001.html>
More information about the llvm-bugs
mailing list