;; True if there's a prefix match outside the outermost
;; paren pair that surrounds the declarator.
got-prefix-before-parens
+ ;; True if there's a prefix, such as "*" which might precede the
+ ;; identifier in a function declaration.
+ got-function-name-prefix
;; True if there's a suffix match outside the outermost
;; paren pair that surrounds the declarator. The value is
;; the position of the first suffix match.
(unless got-prefix-before-parens
(setq got-prefix-before-parens (= paren-depth 0)))
(setq got-prefix t)
+ (when (save-match-data
+ (looking-at c-type-decl-operator-prefix-key))
+ (setq got-function-name-prefix t))
(goto-char (match-end 1)))
(c-forward-syntactic-ws)))
(throw 'at-decl-or-cast t))
(when (and got-parens
- (not got-prefix)
+ (not got-function-name-prefix)
;; (not got-suffix-after-parens)
(or backup-at-type
maybe-typeless
'dont-doc)
(c-lang-defconst c-type-decl-operator-prefix-key
- "Regexp matching any declarator operator which isn't a keyword
+ "Regexp matching any declarator operator which isn't a keyword,
that might precede the identifier in a declaration, e.g. the
\"*\" in \"char *argv\". The end of the first submatch is taken
as the end of the operator. Identifier syntax is in effect when