This fixes bug #24246.
* lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): In the "pseudo
match" loop, test a found string for a match with c-opt-identifier-concat-key
(e.g. with "::").
(and (< (point) cfd-limit)
(c-got-face-at (point) c-literal-faces))))
t) ; Continue the loop over pseudo matches.
+ ((and c-opt-identifier-concat-key
+ (match-string 1)
+ (save-excursion
+ (goto-char (match-beginning 1))
+ (looking-at c-opt-identifier-concat-key)))
+ ;; Found, e.g., "::" in C++
+ t)
((and (match-string 1)
(string= (match-string 1) ":")
(save-excursion