diff lisp/progmodes/cc-menus.el @ 79114:5a26fd1686ae

(cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow.
author Glenn Morris <rgm@gnu.org>
date Wed, 17 Oct 2007 01:36:24 +0000
parents c1ec1c8a8d2e
children a1342e6e097a 1251cabc40b7
line wrap: on
line diff
--- a/lisp/progmodes/cc-menus.el	Wed Oct 17 01:36:10 2007 +0000
+++ b/lisp/progmodes/cc-menus.el	Wed Oct 17 01:36:24 2007 +0000
@@ -106,7 +106,9 @@
     (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