Version: SVN (using KDE 4.4.3)
Code completion won't trigger after a comment beginning in //* until the scope changes.
Steps to Reproduce:
Step 1: Open a c++ file and chose a place to use code completion.
Step 2: Type a bit or use ctrl-space to confirm the popup appears.
Step 3: Add a comment beginning in //* within the same scope.
Step 4: Try to trigger code completion after this comment (within the same scope).
Code completion won't trigger.
Code completion should trigger.
This is a valid one-line comment, but the code completion refuses to trigger. I expect it's parsing it as a /* comment.
Severity is minor as it is easy to work around, but it is non-obvious for anyone who encounters it and feels like kdevelop is broken until my typo is discovered.
I can reproduce this in 4.1.
I think the solution is simply to make KDevelop::clearComments clear //comments before /*comments*/. After clearing //comments, it won't find a "/*" anymore, and it won't wrongly think the cursor is inside a comment.
I'll try this tomorrow.
Git commit 1b51218cd6122230e40698934e7bcc311a92be07 by Olivier JG.
Committed on 09/06/2011 at 04:31.
Pushed by olivierjg into branch 'master'.
Fix clearComments() to work with "//*" and "/*//*/" stuff that it used to choke on
(See testClearComments in test_cppcodecompletion)
M +30 -39 language/duchain/stringhelpers.cpp