From: João Távora Date: Mon, 25 Mar 2019 14:50:20 +0000 (+0000) Subject: Avoid occasional confusion of Flymake C/C++ backend X-Git-Tag: emacs-27.0.90~3349 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=67c3a3af1d9e2582193d5ea33b6c190e79ad56e6;p=emacs.git Avoid occasional confusion of Flymake C/C++ backend The regexp would sometimes match non-errors and create a diagnostic with nil severity, which would have consequences for the Flymake engine (these should eventually be addressed, too). * lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics): Tighten regexp. --- diff --git a/lisp/progmodes/flymake-cc.el b/lisp/progmodes/flymake-cc.el index 1b449bd0793..248c95a256f 100644 --- a/lisp/progmodes/flymake-cc.el +++ b/lisp/progmodes/flymake-cc.el @@ -58,7 +58,9 @@ SOURCE." (cl-loop while (search-forward-regexp - "^\\(In file included from \\)?:\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?:\n?\\(.*\\): \\(.*\\)$" + (concat + "^\\(In file included from \\)?:\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)" + "?:[\n ]?\\(error\\|warning\\|note\\): \\(.*\\)$") nil t) for msg = (match-string 5) for (beg . end) = (flymake-diag-region