Function: c-fl-decl-end

c-fl-decl-end is a byte-compiled function defined in cc-mode.el.gz.

Signature

(c-fl-decl-end POS)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-mode.el.gz
(defun c-fl-decl-end (pos)
  ;; If POS is inside a declarator, return the end of the token that follows
  ;; the declarator, otherwise return nil.  POS being in a literal does not
  ;; count as being in a declarator (on pragmatic grounds).  POINT is not
  ;; preserved.
  (goto-char pos)
  (let ((lit-start (c-literal-start))
	(lim (c-determine-limit 1000))
	enclosing-attribute pos1)
    (unless lit-start
      (c-backward-syntactic-ws
       lim)
      (when (setq enclosing-attribute (c-enclosing-c++-attribute))
	(goto-char (car enclosing-attribute))) ; Only happens in C++ Mode.
      (when (setq pos1 (c-on-identifier))
	(goto-char pos1)
	(let ((lim (save-excursion
		     (and (c-beginning-of-macro)
			  (progn (c-end-of-macro) (point))))))
	  (and (c-forward-declarator lim)
	       (if (eq (char-after) ?\()
		   (and
		    (c-go-list-forward nil lim)
		    (progn (c-forward-syntactic-ws lim)
			   (not (eobp)))
		    (progn
		      (if (looking-at c-symbol-char-key)
			  ;; Deal with baz (foo((bar)) type var), where
			  ;; foo((bar)) is not semantically valid.  The result
			  ;; must be after var).
			  (and
			   (goto-char pos)
			   (setq pos1 (c-on-identifier))
			   (goto-char pos1)
			   (progn
			     (c-backward-syntactic-ws lim)
			     (eq (char-before) ?\())
			   (c-fl-decl-end (1- (point))))
			(c-backward-syntactic-ws lim)
			(point))))
		 (and (progn (c-forward-syntactic-ws lim)
			     (not (eobp)))
		      (c-backward-syntactic-ws lim)
		      (point)))))))))