Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
New code completion remarks/issues
ollydbg:
I just find a small bug.
When I first only the TESTING workplace, and only the symbol tree. When I double click on the tree item, no jumping was taken.
After I toggle or switch the editor page several times, the jumping works.
So, it seems the "First jump mechanism" was some problem.
blueshake:
Maybe the parse has not been finished yet. :D
ollydbg:
--- Quote from: blueshake on October 07, 2009, 10:04:28 am ---For the right valuetip on typedef.
patch:
--- Code: ---Index: src/plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- src/plugins/codecompletion/parser/parserthread.cpp (revision 5852)
+++ src/plugins/codecompletion/parser/parserthread.cpp (working copy)
@@ -1765,6 +1765,7 @@
{
tdef->m_AncestorsString = ancestor;
tdef->m_ActualType = ancestor;
+ tdef->m_Type = ancestor;
}
else
tdef->m_ActualType = ancestor + args;
--- End code ---
--- End quote ---
Yes, it works on the test code below:
--- Code: ---#include <iostream>
#include <iostream>
using namespace std;
std::vector<string> ssss;
#define xxxxxxxxx 12e
typedef class qq
{
int x;
int y;
}eeee;
typedef unsigned int wwwwwwwww;
www!
int main()
{
cout << "Hello world!" << endl;
return 0;
}
--- End code ---
blueshake:
test codes:
--- Code: ---#include <iostream>
using namespace std;
struct qq
{
int x;
int y;
};
typedef qq (*ptr)(int a, int b);
ptr pp;
pp(3,3). --------not work.
int main()
{
cout << "Hello world!" << endl;
return 0;
}
--- End code ---
Edit:
relative with these codes:
--- Code: --- if (token.GetChar(0) == '(')
{
// function pointer (probably)
is_function_pointer = true;
if (peek.GetChar(0) == '(')
{
// typedef void (*dMessageFunction)(int errnum, const char *msg, va_list ap);
// typedef void (MyClass::*Function)(int);
// remove parentheses and keep everything after the dereferencing symbol
token.RemoveLast();
int pos = token.Find('*', true);
if (pos != wxNOT_FOUND)
{
typ << _T('(') << token.Mid(1, pos) << _T(')');
token.Remove(0, pos + 1);
}
else
{
typ = _T("(*)");
token.Remove(0, 1); // remove opening parenthesis
}
args = peek;
components.push(token);
}
else
{
// typedef void dMessageFunction (int errnum, const char *msg, va_list ap);
typ = _T("(*)");
// last component is already the name and this is the args
args = token;
}
break;
}
--- End code ---
ollydbg:
--- Quote from: blueshake on October 07, 2009, 01:35:04 pm ---typedef qq (*ptr)(int a, int b);
ptr pp;
pp(3,3). --------not work.
--- End quote ---
But it seems the parser get the right token type. You can open the CC debug tool dialog.
see here:
and
So, I think the AI function in nativeparser.cpp has a bug to expand the "ptr".
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version