~ubuntu-branches/debian/sid/emacs24/sid

« back to all changes in this revision

Viewing changes to lisp/cedet/semantic/analyze/fcn.el

  • Committer: Package Import Robot
  • Author(s): Rob Browning
  • Date: 2014-10-25 14:37:43 UTC
  • mfrom: (13.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20141025143743-m9q5reoyyyjq3p2h
Tags: 24.4+1-4
Update emacsen-common dependency as per policy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; semantic/analyze/fcn.el --- Analyzer support functions.
2
2
 
3
 
;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
 
3
;; Copyright (C) 2007-2014 Free Software Foundation, Inc.
4
4
 
5
5
;; Author: Eric M. Ludlam <zappo@gnu.org>
6
6
 
165
165
The TYPE field in a tag can be nil (return nil)
166
166
or a string, or a non-positional tag."
167
167
  (cond ((semantic-tag-p type)
168
 
         (semantic-tag-name type))
 
168
         (if (semantic-tag-named-parent type)
 
169
             (semantic-analyze-unsplit-name `(,(semantic-tag-named-parent type)
 
170
                                              ,(semantic-tag-name type)))
 
171
           (semantic-tag-name type)))
169
172
        ((stringp type)
170
173
         type)
171
174
        ((listp type)
245
248
          (semantic-scope-set-typecache scope nil)
246
249
          )))))
247
250
 
 
251
(autoload 'semantic-tag-similar-p "semantic/tag-ls")
 
252
 
248
253
(defun semantic-analyze-dereference-metatype-stack (type scope &optional type-declaration)
249
254
  "Dereference metatypes repeatedly until we hit a real TYPE.
250
255
Uses `semantic-analyze-dereference-metatype'.
255
260
        (nexttype (semantic-analyze-dereference-metatype type scope type-declaration))
256
261
        (idx 0))
257
262
    (catch 'metatype-recursion
258
 
      (while (and nexttype (not (eq (car nexttype) lasttype)))
 
263
      (while (and nexttype (not (semantic-tag-similar-p (car nexttype) lasttype)))
259
264
        (setq lasttype (car nexttype)
260
265
              lasttypedeclaration (cadr nexttype))
261
266
        (setq nexttype (semantic-analyze-dereference-metatype lasttype scope lasttypedeclaration))