From 0062971af161b820699e78c85dcc78e7d6814c5c Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Tue, 4 Jun 2013 22:19:41 -0400 Subject: [PATCH] bug 409697: References to "required from" appear in red in the console and are flagged as errors in the problems view. --- .../tests/GCCErrorParserTests.java | 21 +++++++++++++++++++ core/org.eclipse.cdt.core/plugin.properties | 2 +- 2 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 3e5509fe581..8b56ee7b811 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 @@ -198,6 +198,27 @@ public class GCCErrorParserTests extends GenericErrorParserTests { ); } + public void testGccErrorMessages_RequiredFromHere() throws IOException { + runParserTest( + new String[] { + "utils/bar.hpp:61:7: required from ‘static void OpenCVUtils::show_contours_d(std::string, cv::Mat&, const std::vector > >&, bool, const Scalar&, int, int, int) [with T = int; std::string = std::basic_string; cv::Scalar = cv::Scalar_]’", + "utils/foo.cpp:117:96: required from here", + }, + 0, // errors + 0, // warnings + 2, // infos + new String[] { + "bar.hpp", + "foo.cpp", + }, + new String[] { + "required from ‘static void OpenCVUtils::show_contours_d(std::string, cv::Mat&, const std::vector > >&, bool, const Scalar&, int, int, int) [with T = int; std::string = std::basic_string; cv::Scalar = cv::Scalar_]’", + "required from here", + }, + new String[] {GCC_ERROR_PARSER_ID} + ); + } + public void testGccErrorMessages_Infos() throws IOException { runParserTest( new String[] { diff --git a/core/org.eclipse.cdt.core/plugin.properties b/core/org.eclipse.cdt.core/plugin.properties index 97395124182..09556e83b07 100755 --- a/core/org.eclipse.cdt.core/plugin.properties +++ b/core/org.eclipse.cdt.core/plugin.properties @@ -49,7 +49,7 @@ CDTGNUCErrorParser.name=GNU gcc/g++ Error Parser CDTGNUCErrorParser.regex.ReportedOnlyOnce=(.*?):(\\d+):(\\d+:)? .*\\(Each undeclared identifier is reported only once.* 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 from .*) +CDTGNUCErrorParser.regex.InstantiatedFromHere=(.*?):(\\d+):(\\d+:)?\\s*(.*((instantiated)|(required)) from .*) 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 .*)