]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/analyze/fcn.el
Update copyright year to 2015
[gnu-emacs] / lisp / cedet / semantic / analyze / fcn.el
index d780327b7e944b1036ae248dbd797e653427c931..4b105c1e5b418ae6df95d34f6206e09cd8abe6c1 100644 (file)
@@ -1,6 +1,6 @@
 ;;; semantic/analyze/fcn.el --- Analyzer support functions.
 
-;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 
@@ -165,7 +165,10 @@ SCOPE is the scope object with additional items in which to search for names."
 The TYPE field in a tag can be nil (return nil)
 or a string, or a non-positional tag."
   (cond ((semantic-tag-p type)
-        (semantic-tag-name type))
+        (if (semantic-tag-named-parent type)
+            (semantic-analyze-unsplit-name `(,(semantic-tag-named-parent type)
+                                             ,(semantic-tag-name type)))
+          (semantic-tag-name type)))
        ((stringp type)
         type)
        ((listp type)
@@ -245,6 +248,8 @@ used by the analyzer debugger."
          (semantic-scope-set-typecache scope nil)
          )))))
 
+(autoload 'semantic-tag-similar-p "semantic/tag-ls")
+
 (defun semantic-analyze-dereference-metatype-stack (type scope &optional type-declaration)
   "Dereference metatypes repeatedly until we hit a real TYPE.
 Uses `semantic-analyze-dereference-metatype'.
@@ -255,7 +260,7 @@ Optional argument TYPE-DECLARATION is how TYPE was found referenced."
        (nexttype (semantic-analyze-dereference-metatype type scope type-declaration))
        (idx 0))
     (catch 'metatype-recursion
-      (while (and nexttype (not (eq (car nexttype) lasttype)))
+      (while (and nexttype (not (semantic-tag-similar-p (car nexttype) lasttype)))
        (setq lasttype (car nexttype)
              lasttypedeclaration (cadr nexttype))
        (setq nexttype (semantic-analyze-dereference-metatype lasttype scope lasttypedeclaration))