1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

Bug 573560: Mark GCC constexpr message as info

A GCC information message starting with 'in constexpr expansion'
was incorrectly parsed as an error.

Change-Id: If6142f8486e97c088315060c826d59e61566692b
Signed-off-by: Stephan Oostveen <stephan.oostveen@nextlevel-electronics.com>
This commit is contained in:
Stephan Oostveen 2021-05-16 00:23:00 +02:00 committed by Jonah Graham
parent 381f29b74e
commit 260c1b39f7
3 changed files with 27 additions and 0 deletions

View file

@ -218,4 +218,22 @@ public class GCCErrorParserTests extends GenericErrorParserTests {
"required from here", "conversion from 'long int' to 'float' may change value [-Wconversion]" },
new String[] { GCC_ERROR_PARSER_ID });
}
public void testGccErrorMessages_InConstexprExpansion() throws IOException {
runParserTest(
new String[] { "../can/CANBus.h: In instantiation of 'constexpr void Test::setupBitrate(T)':",
"../can/CANBus.h:113:6: required from 'static auto& Test::getInstance()'",
"../can/CAN.cpp:19:27: required from here",
"../can/CANBus.h:72:17: in 'constexpr' expansion of 'instance.Test::Test()'",
"../can/CANBus.h:173:92: warning: unused parameter 'bitrate' [-Wunused-parameter]",
" 173 | constexpr void setupBitrate(T bitrate) noexcept {" },
0, // errors
1, //warnings
3, //infos
new String[] { "CAN.cpp", "CANBus.h" },
new String[] { "required from 'static auto& Test::getInstance()'", "required from here",
"in 'constexpr' expansion of 'instance.Test::Test()'",
"unused parameter 'bitrate' [-Wunused-parameter]" },
new String[] { GCC_ERROR_PARSER_ID });
}
}

View file

@ -58,6 +58,7 @@ CDTGNUCErrorParser.regex.ForEachFunctionItAppearsIn=(.*?):(\\d+):(\\d+:)? .*for
CDTGNUCErrorParser.regex.ReportedOnlyOncePerInputFile=(.*?):(\\d+):(\\d+:)? .*this will be reported only once per input file.*
CDTGNUCErrorParser.regex.InstantiatedFromHere=(.*?):(\\d+):(\\d+:)?\\s*(.*((instantiated)|(required)) from .*)
CDTGNUCErrorParser.regex.SkippingInstantiationContexts=(.*?):(\\d+):(\\d+:)?\\s*(\\[\\s*skipping \\d+ instantiation context.*)
CDTGNUCErrorParser.regex.InConstexprExpansion=(.*?):(\\d+):(\\d+:)?\\s*(in 'constexpr' expansion of.*)
CDTGNUCErrorParser.regex.GenericInfo=(.*?):(\\d+):(\\d+:)?\\s*(([Nn]ote)|(NOTE)|([Ii]nfo)|(INFO)): (.*)
CDTGNUCErrorParser.regex.ParseErrorBefore=(.*?):(\\d+):(\\d+:)? (parse error before.*[`'"](.*)['"].*)
CDTGNUCErrorParser.regex.ErrorUndeclared=(.*?):(\\d+):(\\d+:)? [Ee]rror: ([`'"](.*)['"] undeclared .*)

View file

@ -201,6 +201,14 @@
regex="%CDTGNUCErrorParser.regex.SkippingInstantiationContexts"
severity="Info">
</pattern>
<pattern
description-expr="$4"
eat-processed-line="true"
file-expr="$1"
line-expr="$2"
regex="%CDTGNUCErrorParser.regex.InConstexprExpansion"
severity="Info">
</pattern>
<pattern
description-expr="$7"
eat-processed-line="true"