emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 08ccce2 1/4: Improve error parsing for GCC -fanalyzer output


From: Philip Kaludercic
Subject: master 08ccce2 1/4: Improve error parsing for GCC -fanalyzer output
Date: Sun, 21 Nov 2021 13:00:55 -0500 (EST)

branch: master
commit 08ccce2257d81ae4e8a579c374f6a8e886992385
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Improve error parsing for GCC -fanalyzer output
    
    * compile.el (compilation-error-regexp-alist-alist): Adjust gnu rule
    * compile-tests.el (compile-tests--test-regexps-data): Add testcase
---
 lisp/progmodes/compile.el            | 5 ++++-
 test/lisp/progmodes/compile-tests.el | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 14da588..c0e16ce 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -351,7 +351,10 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
              ;; from Ruby, but it is unclear whether it is actually
              ;; used since the gcc-include rule above seems to cover
              ;; it.
-             (regexp "[ \t]+\\(?:in \\|from\\)")))
+             (regexp "[ \t]+\\(?:in \\|from\\)")
+             ;; Skip indentation generated by tools like GCC's
+             ;; -fanalyzer.
+             (: (+ space) "|")))
 
        ;; File name group.
        (group-n 1
diff --git a/test/lisp/progmodes/compile-tests.el 
b/test/lisp/progmodes/compile-tests.el
index 2a3bb3d..c714b9e 100644
--- a/test/lisp/progmodes/compile-tests.el
+++ b/test/lisp/progmodes/compile-tests.el
@@ -230,6 +230,7 @@
     (gnu "foo.c:8:23:information: message" 1 23 8 "foo.c")
     (gnu "foo.c:8.23-45: Informational: message" 1 (23 . 45) (8 . nil) "foo.c")
     (gnu "foo.c:8-23: message" 1 nil (8 . 23) "foo.c")
+    (gnu "   |foo.c:8: message" 1 nil 8 "foo.c")
     ;; The next one is not in the GNU standards AFAICS.
     ;; Here we seem to interpret it as LINE1-LINE2.COL2.
     (gnu "foo.c:8-45.3: message" 1 (nil . 3) (8 . 45) "foo.c")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]