C++: Fix completion for doxygen tags I

There are three cases that must be handled:

 1. Completion in C++ style comment
 2. Completion in first line of a C style comment
 3. Completion in non-first line of a C style comment

This change fixes case 1 + 2. Case 3 will be addressed in a follow-up
change, same goes for the duplication.

Task-number: QTCREATORBUG-15143
Change-Id: I449711f965ddcbbe6158870a8a5ae33218e0d238
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2016-03-29 12:26:25 +02:00
parent 9905eb6f75
commit 4de62a7349
6 changed files with 52 additions and 2 deletions

View File

@@ -991,7 +991,8 @@ int InternalCppCompletionAssistProcessor::startOfOperator(int pos,
}
// Don't complete in comments or strings, but still check for include completion
else if (tk.is(T_COMMENT) || tk.is(T_CPP_COMMENT)
|| tk.is(T_CPP_DOXY_COMMENT) || tk.is(T_DOXY_COMMENT)
|| ((tk.is(T_CPP_DOXY_COMMENT) || tk.is(T_DOXY_COMMENT))
&& !isDoxygenTagCompletionCharacter(ch))
|| (tk.isLiteral() && (*kind != T_STRING_LITERAL
&& *kind != T_ANGLE_STRING_LITERAL
&& *kind != T_SLASH