What's in full/base type at that moment for the samples in the bug tracker?
CC has such code snippet to set full/base type.
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;
So, the fulltype is "char*", and the basetype is "char", so it looks like we can safely use m_FullType, right?
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).
// TODO (Morten#5#): Handle stuff like the following gracefully:
// int __cdecl __MINGW_NOTHROW vscanf (const char * __restrict__, __VALIST);
1, we can add a function like "RemoveAttributeSpecifier()", so we can remove something like: __cdecl or __stdcall
2, __MINGW_NOTHROW can be macro replaced, either to an empty string, or to #define __MINGW_NOTHROW __attribute__ ((__nothrow__)), and I think the __attribute__ should be removed in the RemoveAttributeSpecifier().
3, we can heuristically remove all the tokens like "__XXXXXX".