This should fix bug #60765. In the scenario type an identifier in front of
foo (bar, baz), as when started a new statement. This temporarily makes the
function call a declarator, and bar and baz types. Don't enter bar and baz
into c-found-types.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1) (CASE 6): When a
'maybe type triggers this case, set `unsafe-maybe' to non-nil.
;; types; other identifiers could just as well be
;; constants in C++.
(memq at-type '(known found)))))
- (throw 'at-decl-or-cast t)
+ (progn
+ ;; The user may be part way through typing a statement
+ ;; beginning with an identifier. This makes a 'maybe
+ ;; type in the following "declarator"'s arglist suspect.
+ (when (eq at-type 'maybe)
+ (setq unsafe-maybe t))
+ (throw 'at-decl-or-cast t))
;; CASE 7
;; Can't be a valid declaration or cast, but if we've found a
;; specifier it can't be anything else either, so treat it as