[cedet-semantic] intellisense bug?
Brought to you by:
zappo
|
From: Jamie M. <ma...@cs...> - 2007-03-10 14:24:40
|
Hi, I really dig the intellisense functionality of semantic. I want to try to fix what i think is a bug within semantic-analyze-possible-completions-default. I discovered that in my c code, when i try to complete on the right side of an assignment like this: A foo, bar; foo.member = ba semantic usually has no completions. it should complete bar. it looks like semantic is correctly parsing the left half of the assignment and comes up with a type constraint for the right side of the assignment. in semantic-analyze-possible-completions-default, the result of semantic-analyze-type-constraint is contained in "desired-type." if the completion tag "bar" is not the same type as "member" in the above code, it tries to determine if bar might be a compound type using this code ... ;; Now anything that is a compound type which could contain ;; additional things which are of the desired type (setq c (append c (semantic-find-tags-of-compound-type origc))) The problem is that semantic-find-tags-of-compound-type tries to find a "members" field and a tag doesn't seem to have a "members" field. i replaced this bit of code with the result from a full analysis of the tag. it seems to work. sorry if it's cumbersome and inefficient ... i'm a beginner at elisp (setq c (append c (mapcar (function (lambda (x) (if (semantic-tag-type-members (semantic-analyze-tag-type x (oref a scope))) x ) )) origc ))) is there a more elegant way to do this? please point me in the write direction and i can send a better patch. Also, I think we should include the tag if it isn't in the database, because it may or may not have members. we may not know, right? Thanks, --Jamie |