[PATCH] D17820: Clang Code Completion Filtering
Bianca-Cristina Cristescu via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 23 05:58:23 PDT 2016
CrisCristescu updated this revision to Diff 51404.
CrisCristescu added a comment.
The code_completion token now stores the information, if there is one,
about the identifier that it is lexing.
During the parsing there is a common entry point which is ConsumerToken
where we can set the information necessary for filtering in the Sema
in the case of a code_completion token.
The information is retrieved when doing the actual filtering.
This introduces a change in functionality which means that some tests
had to be modified(6 tests for ObjC) due to the fact that if you press
tab at the end of a word which could be a language specific keyword,
you will get the possible completions of this identifier,
not what could be written after the space. This is in accordance with the
behaviour of IDEs, for instance XCode.
As an example:
const<TAB> will only give completions for variables like constVar,
and if you have const<SPACE><TAB> the you get the possible completions:
const double, const int etc.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12813 bytes
Desc: not available
More information about the cfe-commits