1
#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
給了我這樣的:Emacs CEDET語義沒有`this`關鍵字的自動完成。 (C++)
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(主幹)。
我不能相信我有這個問題只有一個,那一定是我做錯了什麼......