class A
{
public:
static void Test()
{
}
};
struct Soo
{
int aaaa;
};
Soo globalSoo;
int main()
{
A::Test(); //remove this line, then cc work well.
globalSoo.aaaa = 9; //cc allways do work well here
Soo localeSoo;
localeSoo.; // <-- cc do nothing
return 0;
}
and the log output of auto code completion after entering the "dot" after "localeSoo"
MarkItemsByAI()
ParseUsingNamespace() Parse file scope for "using namespace"
ParseFunctionArguments() Parse function arguments
FindCurrentFunctionStart() Cached namespace='', cached proc='main'
GenerateResultSet() search 'main', parent='Global namespace (id:0, type:(null)), isPrefix=0'
ParseFunctionArguments() + Function match: main
ParseLocalBlock() Parse local block
FindCurrentFunctionStart() Cached namespace='', cached proc='main'
Parse() : parsing
DoParse() : Loop:m_Str='', token='A'
DoParse() : Loop:m_Str='', token='Test'
DoParse() : Loop:m_Str='', token='()'
DoParse() : Loop:m_Str='', token=';'
DoParse() : Loop:m_Str='', token='globalSoo'
DoParse() : Loop:m_Str='globalSoo ', token='.'
DoParse() : Loop:m_Str='', token='Soo'
DoParse() : Loop:m_Str='Soo ', token='localeSoo'
DoAddToken() : Created token='localeSoo', file_idx=0, line=6
GetActualTokenType() : Searching within m_Str='Soo'
GetActualTokenType() : Compensated m_Str='Soo'
GetActualTokenType() : Found 'Soo'
DoAddToken() : Prepending 'A::'
DoAddToken() : Added/updated token 'localeSoo' (6), type 'Soo', actual 'A::Soo'. Parent is (-1)
DoParse() : Loop:m_Str='Soo', token=';'
DoParse() : Loop:m_Str='', token='localeSoo'
DoParse() : Loop:m_Str='localeSoo ', token='.'
ParseLocalBlock() Block:
A::Test(); //remove this line, then cc work well.
globalSoo.aaaa = 9; //cc allways do work well here
Soo localeSoo;
localeSoo.
ParseLocalBlock() Local tokens:
ParseLocalBlock() + Soo localeSoo parent =
AI() AI enter, actual: " localeSoo."
AI() =========================================================
AI() Doing AI for ' localeSoo.':
FindCurrentFunctionStart() Cached namespace='', cached proc='main'
GenerateResultSet() search 'main', parent='Global namespace (id:0, type:(null)), isPrefix=0'
AI() Adding search namespace: Global namespace
BreakUpComponents() Breaking up ' localeSoo.'
BreakUpComponents() Found component: 'localeSoo' (Class)
BreakUpComponents() Found component: '' (SearchText)
AI() Parent scope: 'Global namespace' (-1)
FindAIMatches() ----- FindAIMatches - enter -----
FindAIMatches() Search for localeSoo, isLast = 0
FindAIMatches() Looping 1 results
FindAIMatches() Match: 'localeSoo' (ID='6') : type='A::Soo'
BreakUpComponents() Breaking up 'A::Soo'
BreakUpComponents() Found component: 'A' (Namespace)
BreakUpComponents() Found component: 'Soo' (SearchText)
FindAIMatches() Looking for type: 'A::Soo' (2 components)
FindAIMatches() Now looking under 'Global namespace'
FindAIMatches() ----- FindAIMatches - enter -----
FindAIMatches() Search for A, isLast = 0
FindAIMatches() Looping 1 results
FindAIMatches() Match: 'A' (ID='5') : type=''
FindAIMatches() ----- FindAIMatches - enter -----
FindAIMatches() Search for Soo, isLast = 1
FindAIMatches() Looping 0 results
FindAIMatches() ----- FindAIMatches - leave -----
FindAIMatches() ----- FindAIMatches - leave -----
FindAIMatches() No types matched 'A::Soo'.
FindAIMatches() ----- FindAIMatches - enter -----
FindAIMatches() Search for , isLast = 1
FindAIMatches() Looping 0 results
FindAIMatches() ----- FindAIMatches - leave -----
FindAIMatches() ----- FindAIMatches - leave -----
AI() AI leave, returned 0 results
0 results
This is totally wrong!! I'm trying to find the error......