From fe2d08b44a2c783e0b48315cae7fc1fe0201b78f Mon Sep 17 00:00:00 2001 From: Stephan Oostveen Date: Sat, 9 Jan 2021 12:32:50 +0100 Subject: [PATCH] Bug 500798: Mark GCC template init message as info When GCC skips template instantiation in its output it was parsed as an error instead of an informational message. Change-Id: If5dca2d1430a6b5e9cb9317649dea8291bfc0356 Signed-off-by: Stephan Oostveen --- .../errorparsers/tests/GCCErrorParserTests.java | 12 ++++++++++++ core/org.eclipse.cdt.core/META-INF/MANIFEST.MF | 2 +- core/org.eclipse.cdt.core/plugin.properties | 1 + core/org.eclipse.cdt.core/plugin.xml | 8 ++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java index 1514d2fde78..6e581d5c43a 100644 --- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java +++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java @@ -206,4 +206,16 @@ public class GCCErrorParserTests extends GenericErrorParserTests { new String[] { GCC_ERROR_PARSER_ID }); } + public void testGccErrorMessages_TemplateInstantiation_bug500798() throws IOException { + runParserTest(new String[] { + "test.hpp:309:18: [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]", + "test2.hpp:83:60: required from here", + "test3.hpp:78:38: warning: conversion from 'long int' to 'float' may change value [-Wconversion]" }, 0, // errors + 1, //warnings + 2, //infos + new String[] { "test.hpp", "test2.hpp", "test3.hpp" }, + new String[] { "[ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]", + "required from here", "conversion from 'long int' to 'float' may change value [-Wconversion]" }, + new String[] { GCC_ERROR_PARSER_ID }); + } } diff --git a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF index 377ca620f10..e0deeb57d03 100644 --- a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true -Bundle-Version: 7.1.200.qualifier +Bundle-Version: 7.1.300.qualifier Bundle-Activator: org.eclipse.cdt.core.CCorePlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core/plugin.properties b/core/org.eclipse.cdt.core/plugin.properties index 6eca8786449..fbcdc43c132 100644 --- a/core/org.eclipse.cdt.core/plugin.properties +++ b/core/org.eclipse.cdt.core/plugin.properties @@ -57,6 +57,7 @@ CDTGNUCErrorParser.regex.ReportedOnlyOnce=(.*?):(\\d+):(\\d+:)? .*\\(Each undecl CDTGNUCErrorParser.regex.ForEachFunctionItAppearsIn=(.*?):(\\d+):(\\d+:)? .*for each function it appears in.\\).* 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.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 .*) diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml index e88b3b72335..d7f02eb4e65 100644 --- a/core/org.eclipse.cdt.core/plugin.xml +++ b/core/org.eclipse.cdt.core/plugin.xml @@ -193,6 +193,14 @@ + +