diff options
author | Glenn Morris <rgm@gnu.org> | 2007-10-17 01:36:24 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2007-10-17 01:36:24 +0000 |
commit | 41a962dd92097089fa8d3e31d39a7b8c4af472af (patch) | |
tree | e3d0f11f7a2c7b5b5b93200f1034516f8b979132 /lisp/progmodes/cc-menus.el | |
parent | 73d3c088b7fadcffe10513fad950eb15694b6838 (diff) | |
download | emacs-41a962dd92097089fa8d3e31d39a7b8c4af472af.tar.gz |
(cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow.
Diffstat (limited to 'lisp/progmodes/cc-menus.el')
-rw-r--r-- | lisp/progmodes/cc-menus.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index 95359689b9f..eced014d4e6 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -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 |