Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

calculation of BaseType has changed?

(1/2) > >>

ollydbg:
I see many bug report said that BaseType lost the "*", I'm not sure this is a regression or a long time bug.

See:

Functions returning T* are displayed as returning T

or

Insert all class methods without implementation malfunction

MortenMacFly:

--- Quote from: ollydbg on March 16, 2012, 03:41:54 pm ---I see many bug report said that BaseType lost the "*", I'm not sure this is a regression or a long time bug.

--- End quote ---
You can easily find out by trying with 10/05 or 08/02.

BTW: I think there are actually two issues: First, the correct type of functions / methods is not found due to what I have commented in ParserThread::GetTokenBaseType() (I am working on that but its not so easy). For the other one: If is is working safely with FullType its OK, but I wonder if the actual error is that the base type gets truncated. What's in full/base type at that moment for the samples in the bug tracker?

ollydbg:

--- Quote from: MortenMacFly on March 16, 2012, 05:25:18 pm ---What's in full/base type at that moment for the samples in the bug tracker?

--- End quote ---
CC has such code snippet to set full/base type.


--- Code: ---    if (!(kind & (tkConstructor | tkDestructor)))
    {
        wxString tokenFullType = m_Str;
        if (!m_PointerOrRef.IsEmpty())
        {
            tokenFullType << m_PointerOrRef;
            m_PointerOrRef.Clear();
        }
        wxString tokenBaseType = GetTokenBaseType();
        if (tokenBaseType.Find(ParserConsts::space_chr) == wxNOT_FOUND)
        {
            // token type must contain all namespaces
            wxString prepend;

            // Notice: clears the queue "m_EncounteredTypeNamespaces", too
            while (!m_EncounteredTypeNamespaces.empty())
            {
                prepend << m_EncounteredTypeNamespaces.front() << ParserConsts::dcolon;
                m_EncounteredTypeNamespaces.pop();
            }

            TRACE(_T("DoAddToken() : Prepending '%s'"), prepend.wx_str());
            tokenBaseType.Prepend(prepend);
        }
        newToken->m_FullType = tokenFullType;
        newToken->m_BaseType = tokenBaseType;
    }

    newToken->m_IsLocal    = m_IsLocal;
    newToken->m_IsTemp     = m_Options.isTemp;
    newToken->m_IsOperator = isOperator;
--- End code ---

So, the fulltype is "char*", and the basetype is "char", so it looks like we can safely use m_FullType, right?

MortenMacFly:

--- Quote from: ollydbg on March 17, 2012, 08:34:00 am ---So, the fulltype is "char*", and the basetype is "char", so it looks like we can safely use m_FullType, right?

--- End quote ---
Looks like that... why don't you try? I wonder is that works for e.g. template specialisation, too.

ollydbg:

--- Quote from: MortenMacFly on March 17, 2012, 09:20:16 am ---
--- Quote from: ollydbg on March 17, 2012, 08:34:00 am ---So, the fulltype is "char*", and the basetype is "char", so it looks like we can safely use m_FullType, right?

--- End quote ---
Looks like that... why don't you try? I wonder is that works for e.g. template specialisation, too.

--- End quote ---
oh, i have debuged that already. ha.

Navigation

[0] Message Index

[#] Next page

Go to full version