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すると、次のようになります。

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) と cede (trunk) を使用します。

この問題を抱えているのは私だけだとは信じられません。私のやり方が間違っているに違いありません...

4

1 に答える 1

1

私はメンテナの 1 人 (David Engster) と連絡を取りましたが、彼は非常に迅速にこれを修正してくれました。修正は、リビジョン 8490 の CEDET の bzr リポジトリにあります。

于 2013-02-28T23:26:40.830 に答える