summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2016-12-10 21:39:55 +0100
committerPhilipp Stephani <phst@google.com>2016-12-18 21:59:14 +0100
commit5d1d00c34123aad92cffd913152987de05c5e713 (patch)
tree53d24afbe6b7a543d7dcaa1560bbc43401428ed2 /lisp/progmodes/compile.el
parent4b6baba2526c53c56fc1835b6353c0c87fe80a90 (diff)
downloademacs-5d1d00c34123aad92cffd913152987de05c5e713.tar.gz
Add a new compile error regexp for Clang includes
Clang uses a slight variation of GCC's include format, causing includes to be treated as warnings instead of informational messages. Use a new regular expression instead. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): New element `clang-include' for Clang-style "included from" lines. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Add unit test.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index fc7056ceeac..7f20e79a263 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -230,6 +230,13 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
nil 1 nil 2 0
(2 (compilation-face '(3))))
+ (clang-include
+ ,(rx bol "In file included from "
+ (group (+ (not (any ?\n ?:)))) ?:
+ (group (+ (any (?0 . ?9)))) ?:
+ eol)
+ 1 2 nil 0)
+
(gcc-include
"^\\(?:In file included \\| \\|\t\\)from \
\\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\