;;; semantic/analyze/fcn.el --- Analyzer support functions.
-;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;;
;; These queries allow a major mode to help the analyzer make decisions.
;;
-(define-overloadable-function semantic-analyze-tag-prototype-p (tag)
- "Non-nil if TAG is a prototype."
- )
-
-(defun semantic-analyze-tag-prototype-p-default (tag)
- "Non-nil if TAG is a prototype."
- (let ((p (semantic-tag-get-attribute tag :prototype-flag)))
- (cond
- ;; Trust the parser author.
- (p p)
- ;; Empty types might be a prototype.
- ((eq (semantic-tag-class tag) 'type)
- (not (semantic-tag-type-members tag)))
- ;; No other heuristics.
- (t nil))
- ))
-
-;;------------------------------------------------------------
(define-overloadable-function semantic-analyze-split-name (name)
"Split a tag NAME into a sequence.
;;
(define-overloadable-function semantic-analyze-dereference-metatype (type scope &optional type-declaration)
- ;; todo - move into typecahe!!
+ ;; todo - move into typecache!!
"Return a concrete type tag based on input TYPE tag.
A concrete type is an actual declaration of a memory description,
such as a structure, or class. A meta type is an alias,
(if (and type-declaration
(semantic-tag-p type-declaration)
(semantic-tag-of-class-p type-declaration 'type)
- (not (semantic-analyze-tag-prototype-p type-declaration))
+ (not (semantic-tag-prototype-p type-declaration))
)
;; We have an anonymous type for TAG with children.
;; Use this type directly.
(when (and (semantic-tag-p ans)
(eq (semantic-tag-class ans) 'type))
;; We have a tag.
- (if (semantic-analyze-tag-prototype-p ans)
+ (if (semantic-tag-prototype-p ans)
;; It is a prototype.. find the real one.
(or (and scope
(car-safe