1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

(cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow.

This commit is contained in:
Glenn Morris 2007-10-17 01:37:23 +00:00
parent 94b9aaa27d
commit f3523b17a8
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-10-17 Glenn Morris <rgm@gnu.org>
* progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Tweak
regexp to avoid stack overflow.
2007-10-16 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (reindent-then-newline-and-indent): Don't assume that

View file

@ -106,7 +106,9 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
(nil
,(concat
"^\\<" ; line MUST start with word char
"[^()]*" ; no parentheses before
;; \n added to prevent overflow in regexp matcher.
;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-02/msg00021.html
"[^()\n]*" ; no parentheses before
"[^" c-alnum "_:<>~]" ; match any non-identifier char
"\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name
"\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list