Bug 185901

Summary: Do not complete to reserved identifiers
Product: [Applications] kdevelop Reporter: Eckhart Wörner <ewoerner>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: wishlist CC: mcguire
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eckhart Wörner 2009-03-01 20:44:33 UTC
Version:           3.9.91 (using KDevPlatform 0.9.91) (using 4.2.65 (KDE 4.2.65 (KDE 4.3 >= 20090226)), compiled sources)
Compiler:          gcc
OS:                Linux (i686) release 2.6.26-1-686

C++ standard draft specifies that "identifiers containing a double underscore (__) or beginning with an underscore and an upper-case letter are reserved for  use by  C++  implementations  and standard libraries and shall not be used otherwise".
Case 1: User adds <list> header, then types
std::[completion]
result: the first third of the completion list contains reserved identifiers (gcc)
Case 2: User wonders what is in <list> header and hovers over <list>
result: the relevant declarations are buried in lots of internal declarations
Proposed solution: Don't complete to reserved identifiers at all, don't document them.
Comment 1 David Nolden 2010-01-10 21:03:10 UTC
SVN commit 1072725 by zwabel:

Filter declarations that are declared in another file and that have identifiers that are reserved for internal purposes by the C++ standard, from the completion list. (Everything starting with "__" or "_Uppercase").
BUG: 185901

 M  +12 -0     codecompletion/context.cpp  
 M  +18 -13    tests/test_cppcodecompletion.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1072725
Comment 2 David Nolden 2010-01-10 22:04:19 UTC
SVN commit 1072754 by zwabel:

Filter out declarations with reserved identifiers from the navigation-widget shown when hovering #include directives.
CCBUG: 185901

 M  +9 -0      includenavigationcontext.cpp  
 M  +1 -0      includenavigationcontext.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1072754