1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 174142 - Fixed false error with linker error parser. Also cleaned up the messages to remove the warning and error words which are redundant in the Problems view.

This commit is contained in:
Doug Schaefer 2007-05-24 18:32:24 +00:00
parent 1740bc2343
commit c19ba7a148
3 changed files with 6 additions and 16 deletions

View file

@ -34,7 +34,7 @@ public class GCCErrorParser extends AbstractErrorParser {
new ErrorPattern(Messages.GCCErrorParser_skip_note), new ErrorPattern(Messages.GCCErrorParser_skip_note),
new ErrorPattern(Messages.GCCErrorParser_sikp_instantiatedFromHere), new ErrorPattern(Messages.GCCErrorParser_sikp_instantiatedFromHere),
// The following are not... // The following are not...
new ErrorPattern(Messages.GCCErrorParser_Warnings, 1, 2, 4, 0, 0) { new ErrorPattern(Messages.GCCErrorParser_Warnings, 1, 2, 5, 0, 0) {
public String getVarName(Matcher matcher) { public String getVarName(Matcher matcher) {
String desc = getDesc(matcher); String desc = getDesc(matcher);
Matcher varMatcher = null; Matcher varMatcher = null;
@ -49,8 +49,8 @@ public class GCCErrorParser extends AbstractErrorParser {
return varMatcher != null ? varMatcher.group(1) : null; return varMatcher != null ? varMatcher.group(1) : null;
} }
public int getSeverity(Matcher matcher) { public int getSeverity(Matcher matcher) {
String warningGroup = matcher.group(5); String warningGroup = matcher.group(4);
if (warningGroup != null) if (warningGroup == null || warningGroup.contains("arning"))
return IMarkerGenerator.SEVERITY_WARNING; return IMarkerGenerator.SEVERITY_WARNING;
else else
return IMarkerGenerator.SEVERITY_ERROR_RESOURCE; return IMarkerGenerator.SEVERITY_ERROR_RESOURCE;

View file

@ -12,8 +12,6 @@
package org.eclipse.cdt.internal.errorparsers; package org.eclipse.cdt.internal.errorparsers;
import java.util.regex.Matcher;
import org.eclipse.cdt.core.IMarkerGenerator; import org.eclipse.cdt.core.IMarkerGenerator;
public class GLDErrorParser extends AbstractErrorParser { public class GLDErrorParser extends AbstractErrorParser {
@ -21,15 +19,7 @@ public class GLDErrorParser extends AbstractErrorParser {
private static final ErrorPattern[] patterns = { private static final ErrorPattern[] patterns = {
new ErrorPattern(Messages.GLDErrorParser_error_text, 1, 0, 2, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE), //$NON-NLS-1 new ErrorPattern(Messages.GLDErrorParser_error_text, 1, 0, 2, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE), //$NON-NLS-1
new ErrorPattern(Messages.GLDErrorParser_warning_general, 2, IMarkerGenerator.SEVERITY_WARNING), //$NON-NLS-1 new ErrorPattern(Messages.GLDErrorParser_warning_general, 2, IMarkerGenerator.SEVERITY_WARNING), //$NON-NLS-1
new ErrorPattern(Messages.GLDErrorParser_error_general, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE) { //$NON-NLS-1 new ErrorPattern(Messages.GLDErrorParser_error_general, 2, IMarkerGenerator.SEVERITY_ERROR_RESOURCE) //$NON-NLS-1
public String getDesc(Matcher matcher) {
// add in the name of the link command to give it some context
StringBuffer buff = new StringBuffer();
buff.append("ld: "); //$NON-NLS-1$
buff.append(matcher.group(2));
return buff.toString();
}
}
}; };
public GLDErrorParser() { public GLDErrorParser() {

View file

@ -16,9 +16,9 @@ GCCErrorParser_skip_UndeclaredOnlyOnce=\\(Each undeclared identifier is reported
GCCErrorParser_skip_forEachFunction=for each function it appears in.\\) GCCErrorParser_skip_forEachFunction=for each function it appears in.\\)
GCCErrorParser_skip_note=: note: GCCErrorParser_skip_note=: note:
GCCErrorParser_sikp_instantiatedFromHere=instantiated from here GCCErrorParser_sikp_instantiatedFromHere=instantiated from here
GCCErrorParser_Warnings=(.*?):([0-9]+):([0-9]+:)? ((.*?[Ww]arning)?.*) GCCErrorParser_Warnings=(.*?):([0-9]+):([0-9]+:)?(.*?[([Ww]arning)([Ee]rror)]:?)? (.*)
GLDErrorParser_error_text=(.*)\\(\\.text\\+.*\\): (.*) GLDErrorParser_error_text=(.*)\\(\\.text\\+.*\\): (.*)
GLDErrorParser_warning_general=ld(\\.exe)?: ([Ww]arning .*) GLDErrorParser_warning_general=ld(\\.exe)?: [Ww]arning:? (.*)
GLDErrorParser_error_general=ld(\\.exe)?: (.*) GLDErrorParser_error_general=ld(\\.exe)?: (.*)
MakeErrorParser_error_entering=make\\[(.*)\\]: Entering directory `(.*)' MakeErrorParser_error_entering=make\\[(.*)\\]: Entering directory `(.*)'
MakeErrorParser_error_leaving=make\\[.*\\]: Leaving directory MakeErrorParser_error_leaving=make\\[.*\\]: Leaving directory