[cfe-commits] r82293 - in /cfe/trunk: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/CodeCompleteConsumer.cpp test/CodeCompletion/functions.cpp

Chris Lattner clattner at apple.com
Mon Sep 21 15:44:30 PDT 2009


On Sep 21, 2009, at 2:33 PM, Douglas Gregor wrote:

>
> On Sep 21, 2009, at 2:12 PM, Chris Lattner wrote:
>
>>
>> On Sep 18, 2009, at 3:15 PM, Douglas Gregor wrote:
>>
>>> Author: dgregor
>>> Date: Fri Sep 18 17:15:54 2009
>>> New Revision: 82293
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=82293&view=rev
>>> Log:
>>> Introduce code completion strings, which describe how to *use* the
>>> results of code completion, e.g., by providing function call syntax
>>> with placeholders for each of the parameters.
>>
>> Very nice Doug,
>>
>> Would it make sense to support "informational" Chunks which would  
>> be shown in the list of possibilities the user would select from,  
>> but would not be inserted?  This would allow you to say that  
>> "Base::N" is hidden in a base class, but "N" is in "class foo".
>>
>> In fact, when completing P->  for members that are not in P's  
>> direct class (but are in base classes) it would be nifty to show  
>> which base class they come from in the popup.  What do you think?
>
>
> I like it. We currently provide qualification when the name in the  
> base class (or an outer context) is *hidden*, because in that case  
> we show the qualification is needed for us to have any chance of  
> doing the right thing.

Right, I'd expect to see something like this in the 'popup' for P->

field1
field2         - Base class 'foo'
Base::field2   - Base class 'Base', hidden by 'foo::field2'
field3

etc, where field1/field3 are direct fields in *p.  This way you don't  
get noise when dealing with simple structs with no base classes, etc.

>
> One concern about showing the qualification like "Base::" for all  
> members found in base classes is that it could take up a lot of  
> horizontal space, especially for people who like long class names :)

Sounds like a UI problem :)

-Chris



More information about the cfe-commits mailing list