<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Incomplete completions if function's curly brace is missing"
   href="https://llvm.org/bugs/show_bug.cgi?id=24838">24838</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incomplete completions if function's curly brace is missing
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>libclang
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nikolai.kosjar@theqtcompany.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Also affected: clang 3.6.x
Origin: <a href="https://bugreports.qt.io/browse/QTCREATORBUG-15073">https://bugreports.qt.io/browse/QTCREATORBUG-15073</a>

% cat -n case-globalfunctions.cpp 
     1    int myprecedingGlobal;
     2    int f() { my // COMPLETE HERE
     3    int mysucceedingGlobal;


Completion for mysucceedingGlobal is not offered:

% clang-3.7 -cc1 -code-completion-at case-globalfunctions.cpp:2:13
case-globalfunctions.cpp | grep my
case-globalfunctions.cpp:2:11: error: use of undeclared identifier 'my'
int f() { my
          ^
1 error generated.
COMPLETION: myprecedingGlobal : [#int#]myprecedingGlobal
zsh: exit 1     clang-3.7 -cc1 -code-completion-at   | 
zsh: done       grep --color=auto my
%

Similar for incomplete member functions:

% cat -n case-memberfunctions.cpp 
     1    int myprecedingGlobal;
     2    
     3    struct C {
     4        int myprecedingMember;
     5        int f() { my // COMPLETE HERE
     6        int mysucceedingMember;
     7    };
     8    
     9    int mysucceedingGlobal;


% clang-3.7 -cc1 -code-completion-at case-memberfunctions.cpp:5:17
case-memberfunctions.cpp | grep my
case-memberfunctions.cpp:9:23: error: expected '}'
int mysucceedingGlobal;
                      ^
case-memberfunctions.cpp:3:10: note: to match this '{'
struct C {
         ^
case-memberfunctions.cpp:5:15: error: use of undeclared identifier 'my'
    int f() { my
              ^
2 errors generated.
COMPLETION: myprecedingGlobal : [#int#]myprecedingGlobal
COMPLETION: myprecedingMember : [#int#]myprecedingMember
COMPLETION: mysucceedingGlobal : [#int#]mysucceedingGlobal
zsh: exit 1     clang-3.7 -cc1 -code-completion-at   | 
zsh: done       grep --color=auto my
 %</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>