From 9dceeabe43a5997a2b84438fed499a3a8f5c6995 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 5 Jan 2019 08:52:28 +1100 Subject: Backport: Recognize negative line numbers in GCC-format messages. Cppcheck shows some whole-file errors as line -1. Backport of changeset 7191:c9ef21df2e3c. --- lexers/LexErrorList.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lexers') diff --git a/lexers/LexErrorList.cxx b/lexers/LexErrorList.cxx index b3dcd2a59..4ca772814 100644 --- a/lexers/LexErrorList.cxx +++ b/lexers/LexErrorList.cxx @@ -175,7 +175,7 @@ static int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLi canBeCtags = false; } } else if (state == stGccStart) { // : - state = Is0To9(ch) ? stGccDigit : stUnrecognized; + state = ((ch == '-') || Is0To9(ch)) ? stGccDigit : stUnrecognized; } else if (state == stGccDigit) { // : if (ch == ':') { state = stGccColumn; // :9.*: is GCC -- cgit v1.2.3