Bug 185901 - Do not complete to reserved identifiers
Summary: Do not complete to reserved identifiers
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: git master
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-01 20:44 UTC by Eckhart Wörner
Modified: 2010-01-10 22:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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