I understand your idea.
size_t NativeParserBase::ResolveActualType(TokenTree* tree,
wxString searchText,
const TokenIdxSet& searchScope,
TokenIdxSet& result)
See the third parameter, it is the searchScope, which is a C++ exposed scope(context). It can be introduced by
1, using directive
2, class inheritance
3, scope exposed in its include files
4, other cases
So, how do you get them?
The dirty thing is C++ grammar is context sensitive, it is hard to solve which type when the Parserthread meet a decltype.
Another thing is:
Is it possible to introduce a Token, which has type string named "undefined" or "lasy", then when NativeParser need to show tooltip or code suggestion, it can solve them. (I mean solve the types later when needed)
Final thought, type solving is related to semantic check stage, but our CC's parser mostly do a syntax check, so if we need precise information, a full parser (Clang or GCC) is needed.