Re: [cedet-semantic] error "Cannot find types" when calling semantic-ia-complete-symbol
Brought to you by:
zappo
|
From: Eric M. L. <eri...@gm...> - 2012-10-12 02:02:12
|
On 10/11/2012 01:16 PM, Liu Binsheng wrote:
> Hi,
>
> When I use semantic-ia-complete-symbol, it signals an error
> "semantic-analyze-possible-completions-default: Cannot find types for
> `vector vec'" in the *Message* buffer.
>
> I removed all my semanticdb files to let semantic parse the headers
> again. But when I issued the command, the error occured immediately
> after the local files were parsed. And the completion for local
> symbols works fine. Maybe there's something wrong in parsing the
> system include files, but I'm not sure. Following is the c++ code.
>
> #include<vector>
> using namespace std;
>
> int main()
> {
> vector<int> vec;
> vec.
> }
>
> And toggle-debug-on-error output:
>
> Debugger entered--Lisp error: (error "Cannot find types for `vector vec'")
> signal(error ("Cannot find types for `vector vec'"))
> error("Cannot find types for `%s'" "vector vec")
> semantic-analyze-possible-completions-default([object semantic-analyze-context "context" (77 . 77) (("vec" variable ... ... [55 71]) "") (function variable type) (nil) [object semantic-scope-cache "Cache" [object semanticdb-table "main.cpp" [object semanticdb-project-database-file "test/" "/home/chris/code/cpp/test/" semanticdb-table nil ... "/home/chris/.emacs.d/semanticdb/!home!chris!code!cpp!test!semantic.cache" "2.0" "2.1beta"] c++-mode ... nil [object semanticdb-find-search-index "#<semanticdb-table main.cpp> index" #2 ... [object semanticdb-typecache "/home/chris/code/cpp/test/main.cpp" nil nil nil ...]] ... "main.cpp" nil nil 80 289 ... ... nil] ("main" function ... nil #<overlay from 41 to 79 in main.cpp>) nil nil nil nil nil nil (...) nil] #<buffer main.cpp> nil] nil)
> semantic-analyze-possible-completions([object semantic-analyze-context "context" (77 . 77) (("vec" variable ... ... [55 71]) "") (function variable type) (nil) [object semantic-scope-cache "Cache" [object semanticdb-table "main.cpp" [object semanticdb-project-database-file "test/" "/home/chris/code/cpp/test/" semanticdb-table nil ... "/home/chris/.emacs.d/semanticdb/!home!chris!code!cpp!test!semantic.cache" "2.0" "2.1beta"] c++-mode ... nil [object semanticdb-find-search-index "#<semanticdb-table main.cpp> index" #2 ... [object semanticdb-typecache "/home/chris/code/cpp/test/main.cpp" nil nil nil ...]] ... "main.cpp" nil nil 80 289 ... ... nil] ("main" function ... nil #<overlay from 41 to 79 in main.cpp>) nil nil nil nil nil nil (...) nil] #<buffer main.cpp> nil])
> semantic-ia-complete-symbol(77)
> call-interactively(semantic-ia-complete-symbol t nil)
> execute-extended-command(nil)
> call-interactively(execute-extended-command nil nil)
>
> How can I fix this? Thanks in advance for any help.
Hi,
I tried you sample code, and it worked fine for me, providing 37
possible completions.
Your best bet is to use:
M-x semantic-analyze-debug-assist RET
This command appears to have lost it's autoload cookie in CEDET/BZR, so
you may need to (require 'semantic/analyze/debug) to get the function.
This will dump out all the possible reasons it can't find vec, and
perhaps one of them will identify a lost header or something that will
help you fix things.
Good Luck
Eric
|