From 494b2dc62c4c1a997a3eee40105931e4a857a2f4 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Sun, 27 Jun 2010 02:45:29 +0000 Subject: [PATCH] bug 318093: GCCErrorParser treats instantiation warnings as errors --- .../errorparsers/tests/GCCErrorParserTests.java | 15 +++++++++++---- .../tests/GenericErrorParserTests.java | 1 + core/org.eclipse.cdt.core/plugin.properties | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) 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 33bb28db53c..12675bd0ac0 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 @@ -180,13 +180,20 @@ public class GCCErrorParserTests extends GenericErrorParserTests { public void testGccErrorMessages_InstantiatedFromHere() throws IOException { runParserTest( new String[] { - "C:/QNX630/workspace/System/src/CommonScriptClasses.cpp:609: instantiated from here", + "/usr/include/c++/4.1.3/ext/hashtable.h:600: instantiated from ‘size_t __gnu_cxx::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>::_M_bkt_num(const _Val&, size_t) const [with _Val = std::pair, std::allocator >, int>, _Key = std::basic_string, std::allocator >, _HashFcn = __gnu_cxx::hash, std::allocator > >, _ExtractKey = std::_Select1st, std::allocator >, int> >, _EqualKey = std::equal_to, std::allocator > >, _Alloc = std::allocator]’", + "C:/QNX630/workspace/System/src/NewCommonScriptClasses.cpp:609: instantiated from here", }, 0, // errors 0, // warnings - 1, // infos - new String[] {"CommonScriptClasses.cpp"}, - new String[] {"instantiated from here"}, + 2, // infos + new String[] { + "hashtable.h", + "NewCommonScriptClasses.cpp", + }, + new String[] { + "instantiated from ‘size_t __gnu_cxx::hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>::_M_bkt_num(const _Val&, size_t) const [with _Val = std::pair, std::allocator >, int>, _Key = std::basic_string, std::allocator >, _HashFcn = __gnu_cxx::hash, std::allocator > >, _ExtractKey = std::_Select1st, std::allocator >, int> >, _EqualKey = std::equal_to, std::allocator > >, _Alloc = std::allocator]’", + "instantiated from here", + }, new String[] {GCC_ERROR_PARSER_ID} ); } diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java index 8df30e65236..7a0bd5ecdf3 100644 --- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java +++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java @@ -139,6 +139,7 @@ public abstract class GenericErrorParserTests extends TestCase { if (expectedFileNames != null) { assertEquals(expectedFileNames.length, markerGenerator.uniqFiles.size()); for (int i = 0; i < expectedFileNames.length; i++) { + // Keep in mind that uniqFiles get alphabetically sorted IPath path = ((IFile)markerGenerator.uniqFiles.get(i)).getLocation(); assertEquals(expectedFileNames[i], path.lastSegment()); } diff --git a/core/org.eclipse.cdt.core/plugin.properties b/core/org.eclipse.cdt.core/plugin.properties index ef51894ae0b..d560aac489f 100644 --- a/core/org.eclipse.cdt.core/plugin.properties +++ b/core/org.eclipse.cdt.core/plugin.properties @@ -48,7 +48,7 @@ CDTGNUCErrorParser.name=CDT GNU C/C++ 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 here.*) +CDTGNUCErrorParser.regex.InstantiatedFromHere=(.*?):(\\d+):(\\d+:)?\\s*(.*instantiated 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 .*)