I got the reason why the right const don't work.
here is the reason:
for these codes,
when the parser meet const ,it clear the m_Str;
see codes in void ParserThread::DoParse() in parserthread.cpp
else if (token==ParserConsts::kw_const)
{
m_Str.Clear();
}
as we known, m_Str stored the variable type,and if const is in
the right position and the parser clear the m_Str,the varible type will become
nothing ,that's why cc don't work.
I think the parser should do nothing when it meet const.
here is the patch.
Index: plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- plugins/codecompletion/parser/parserthread.cpp (revision 5784)
+++ plugins/codecompletion/parser/parserthread.cpp (working copy)
@@ -455,7 +455,7 @@
}
else if (token==ParserConsts::kw_const)
{
- m_Str.Clear();
+ //m_Str.Clear();
}
else if (token==ParserConsts::kw_extern)
{