aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-engine.el28
1 files changed, 24 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0c338fa3868..447942e9a2a 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -9275,9 +9275,10 @@ This function might do hidden buffer changes."
9275 ;; 9275 ;;
9276 ;; The third element of the return value is non-nil when the declaration 9276 ;; The third element of the return value is non-nil when the declaration
9277 ;; parsed might be an expression. The fourth element is the position of 9277 ;; parsed might be an expression. The fourth element is the position of
9278 ;; the start of the type identifier. The fifth element is t if either 9278 ;; the start of the type identifier, or the same as the first element when
9279 ;; CONTEXT was 'top, or the declaration is detected to be treated as top 9279 ;; there is no type identifier. The fifth element is t if either CONTEXT
9280 ;; level (e.g. with the keyword "extern"). 9280 ;; was 'top, or the declaration is detected to be treated as top level
9281 ;; (e.g. with the keyword "extern").
9281 ;; 9282 ;;
9282 ;; If a cast is parsed: 9283 ;; If a cast is parsed:
9283 ;; 9284 ;;
@@ -9680,7 +9681,26 @@ This function might do hidden buffer changes."
9680 (setq got-identifier (c-forward-name)) 9681 (setq got-identifier (c-forward-name))
9681 (setq name-start pos)) 9682 (setq name-start pos))
9682 (when (looking-at "[0-9]") 9683 (when (looking-at "[0-9]")
9683 (setq got-number t))) ; We've probably got an arithmetic expression. 9684 (setq got-number t)) ; We probably have an arithmetic expression.
9685 (and maybe-typeless
9686 (or (eq at-type 'maybe)
9687 (when (eq at-type 'found)
9688 ;; Remove the ostensible type from the found types list.
9689 (when type-start
9690 (c-unfind-type
9691 (buffer-substring-no-properties
9692 type-start
9693 (save-excursion
9694 (goto-char type-start)
9695 (c-end-of-token)
9696 (point)))))
9697 t))
9698 ;; The token which we assumed to be a type is actually the
9699 ;; identifier, and we have no explicit type.
9700 (setq at-type nil
9701 name-start type-start
9702 id-start type-start
9703 got-identifier t)))
9684 9704
9685 ;; Skip over type decl suffix operators and trailing noise macros. 9705 ;; Skip over type decl suffix operators and trailing noise macros.
9686 (while 9706 (while