(goto-char (match-end 1))
(c-forward-syntactic-ws)))
+ ;; Skip any "WS" identifiers (e.g. "final" or "override" in C++)
+ (while (looking-at c-type-decl-suffix-ws-ids-key)
+ (goto-char (match-end 1))
+ (c-forward-syntactic-ws)
+ (setq res t))
+
(when c-opt-type-concat-key ; Only/mainly for pike.
;; Look for a trailing operator that concatenates the type
;; with a following one, and if so step past that one through
(setq type-start (point))
(setq at-type (c-forward-type))))
+ ;; Move forward over any "WS" ids (like "final" or "override" in C++)
+ (while (looking-at c-type-decl-suffix-ws-ids-key)
+ (goto-char (match-end 1))
+ (c-forward-syntactic-ws))
+
(setq
at-decl-or-cast
(catch 'at-decl-or-cast
not the type face."
t nil
c '("const" "restrict" "volatile")
- c++ '("const" "noexcept" "volatile" "throw" "final" "override")
+ c++ '("const" "noexcept" "volatile" "throw")
objc '("const" "volatile"))
(c-lang-defconst c-opt-type-modifier-key
(c-lang-const c-type-modifier-kwds))
:test 'string-equal))
+(c-lang-defconst c-type-decl-suffix-ws-ids-kwds
+ "\"Identifiers\" that when immediately following a declarator have semantic
+effect in the declaration, but are syntactically like whitespace."
+ t nil
+ c++ '("final" "override"))
+
+(c-lang-defconst c-type-decl-suffix-ws-ids-key
+ ;; An adorned regexp matching `c-type-decl-suffix-ws-ids-kwds'.
+ t (c-make-keywords-re t (c-lang-const c-type-decl-suffix-ws-ids-kwds)))
+(c-lang-defvar c-type-decl-suffix-ws-ids-key
+ (c-lang-const c-type-decl-suffix-ws-ids-key))
+
(c-lang-defconst c-class-decl-kwds
"Keywords introducing declarations where the following block (if any)
contains another declaration level that should be considered a class.