#include <iostream>
class SomeStructure
{
int mMemberOne;
float mMemberTwo;
char MemberFunction()
{
int test = 0;
++test;
this->
}
};
int main()
{
SomeStructure abc;
abc.MemberFunctionMemberFunction
}
除非我尝试自动填充this->
,否则任何其他自动填充都适用于此文件。我没有得到任何建议。正在运行semantic-analyze-debug-assist
给我这个:
Unable to find symbol this. The prefix lookup code threw the following error: (error "Cannot find definition for \"this\"") To debug this error you can do this: M-x toggle-debug-on-error RET [ Do It ] and then re-run the debug analyzer.
M-x bovinate
给了我:
(("iostream" include (:system-flag t) (unlink-hook (semantic--tag-unlink-secondary-overlays) secondary-overlays (#<overlay from 1 to 20 in junk.cpp>) dependency-file "c:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include/iostream" link-hook (semantic--tag-link-secondary-overlays) unlink-copy-hook (semantic--tag-unlink-copy-secondary-overlays) :filename "d:/project/client/junk.cpp") #<overlay from 1 to 20 in junk.cpp>) ("SomeStructure" type (:members (("mMemberOne" variable
(:type "int")
(reparse-symbol classsubparts)
#<overlay from 46 to 61 in junk.cpp>)
("mMemberTwo" variable
(:type "float")
(reparse-symbol classsubparts)
#<overlay from 64 to 81 in junk.cpp>)
("MemberFunction" function
(:type "char")
(unlink-copy-hook
(semantic--tag-unlink-copy-secondary-overlays)
link-hook
(semantic--tag-link-secondary-overlays)
reparse-symbol classsubparts secondary-overlays
(#<overlay from 85 to 107 in junk.cpp>)
unlink-hook
(semantic--tag-unlink-secondary-overlays))
#<overlay from 85 to 165 in junk.cpp>)) :type "class") (unlink-copy-hook (semantic--tag-unlink-copy-secondary-overlays) link-hook (semantic--tag-link-secondary-overlays) secondary-overlays (#<overlay from 22 to 42 in junk.cpp>) unlink-hook (semantic--tag-unlink-secondary-overlays)) #<overlay from 22 to 168 in junk.cpp>) ("main" function (:type "int") (unlink-copy-hook (semantic--tag-unlink-copy-secondary-overlays) link-hook (semantic--tag-link-secondary-overlays) secondary-overlays (#<overlay from 172 to 183 in junk.cpp>) unlink-hook (semantic--tag-unlink-secondary-overlays)) #<overlay from 172 to 250 in junk.cpp>))
所以看起来SomeStructure
结构被正确解析了。看起来语义与this
有一些问题。
此外,我遵循了错误的建议,即在启用toggle-debug-on-error
的情况下重新运行,但即使启用此功能,调试器似乎也不会因错误而中断。
使用最新版本的emacs(24)和cedet(trunk)。
我无法相信我是唯一有这个问题的人,一定是我做错了...
答案 0 :(得分:1)
我与其中一位维护人员(David Engster)通信,他非常敏感地为此提供了解决方案。该修复程序可以在CEDET的bzr存储库中找到,修订版8490