[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] [FIXED] 79103, 78217
|
You'll probably want to look at applying
this to 2.1 as well.
[FIXED][78217][Parser][IProblems] template
operator has invalid IProblem with blank description
[FIXED][79103][Parser][IProblems] 3
new lineNumber=-1 found in cpp_headers
Devin Steffler
IBM's Eclipse CDT
Ottawa (Palladium), Ontario, Canada
Index: parser/org/eclipse/cdt/internal/core/parser/Parser.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java,v
retrieving revision 1.266
diff -u -r1.266 Parser.java
--- parser/org/eclipse/cdt/internal/core/parser/Parser.java 18 Nov 2004 16:52:07 -0000 1.266
+++ parser/org/eclipse/cdt/internal/core/parser/Parser.java 19 Nov 2004 20:45:41 -0000
@@ -374,7 +374,7 @@
expression = astFactory.createExpression(scope,
IASTExpression.Kind.POSTFIX_TYPEID_TYPEID, null, null,
- null, typeId, null, EMPTY_STRING, null, null);
+ null, typeId, null, EMPTY_STRING, null, (ITokenDuple)start);
list.add(expression);
completedArg = true;
} catch (BacktrackException e) {
@@ -407,7 +407,7 @@
KeywordSetKey.EMPTY);
expression = astFactory.createExpression(scope,
IASTExpression.Kind.ID_EXPRESSION, null, null,
- null, null, nameDuple, EMPTY_STRING, null, null);
+ null, null, nameDuple, EMPTY_STRING, null, (ITokenDuple)start);
list.add(expression);
continue;
} catch (ASTSemanticException e) {
@@ -830,7 +830,7 @@
assignmentExpression = astFactory.createExpression(scope,
IASTExpression.Kind.EXPRESSIONLIST,
assignmentExpression, secondExpression, null, null,
- null, EMPTY_STRING, null, null);
+ null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -871,7 +871,7 @@
consume( IToken.tRPAREN );
try
{
- resultExpression = astFactory.createExpression( scope, extension.getExpressionKindForStatement(), null, null, null, null, null,EMPTY_STRING, null, null );
+ resultExpression = astFactory.createExpression( scope, extension.getExpressionKindForStatement(), null, null, null, null, null,EMPTY_STRING, null, (ITokenDuple)la );
}
catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
@@ -973,7 +973,7 @@
try {
return astFactory.createExpression(scope,
IASTExpression.Kind.THROWEXPRESSION, throwExpression, null,
- null, null, null, EMPTY_STRING, null, null);
+ null, null, null, EMPTY_STRING, null, (ITokenDuple)throwToken);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1009,7 +1009,7 @@
return astFactory.createExpression(scope,
IASTExpression.Kind.CONDITIONALEXPRESSION,
firstExpression, secondExpression, thirdExpression,
- null, null, EMPTY_STRING, null, null);
+ null, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1041,7 +1041,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.LOGICALOREXPRESSION,
firstExpression, secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1073,7 +1073,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.LOGICALANDEXPRESSION,
firstExpression, secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1106,7 +1106,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.INCLUSIVEOREXPRESSION,
firstExpression, secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1139,7 +1139,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.EXCLUSIVEOREXPRESSION,
firstExpression, secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1171,7 +1171,7 @@
try {
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.ANDEXPRESSION, firstExpression,
- secondExpression, null, null, null, EMPTY_STRING, null, null);
+ secondExpression, null, null, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1229,7 +1229,7 @@
? IASTExpression.Kind.EQUALITY_EQUALS
: IASTExpression.Kind.EQUALITY_NOTEQUALS,
firstExpression, secondExpression, null, null,
- null, EMPTY_STRING, null, null);
+ null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1296,7 +1296,7 @@
firstExpression = astFactory.createExpression(scope,
expressionKind, firstExpression,
secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1344,7 +1344,7 @@
? IASTExpression.Kind.SHIFT_LEFT
: IASTExpression.Kind.SHIFT_RIGHT),
firstExpression, secondExpression, null, null,
- null, EMPTY_STRING, null, null);
+ null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1385,7 +1385,7 @@
? IASTExpression.Kind.ADDITIVE_PLUS
: IASTExpression.Kind.ADDITIVE_MINUS),
firstExpression, secondExpression, null, null,
- null, EMPTY_STRING, null, null);
+ null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1437,7 +1437,7 @@
firstExpression = astFactory.createExpression(scope,
expressionKind, firstExpression,
secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
firstExpression.freeReferences();
throwBacktrack(e.getProblem());
@@ -1479,7 +1479,7 @@
? IASTExpression.Kind.PM_DOTSTAR
: IASTExpression.Kind.PM_ARROWSTAR),
firstExpression, secondExpression, null, null,
- null, EMPTY_STRING, null, null);
+ null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1543,7 +1543,7 @@
try {
return astFactory.createExpression(scope,
IASTExpression.Kind.CASTEXPRESSION, castExpression,
- null, null, typeId, null, EMPTY_STRING, null, null);
+ null, null, typeId, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1812,7 +1812,7 @@
return astFactory.createExpression(scope, (vectored
? IASTExpression.Kind.DELETE_VECTORCASTEXPRESSION
: IASTExpression.Kind.DELETE_CASTEXPRESSION),
- castExpression, null, null, null, null, EMPTY_STRING, null, null);
+ castExpression, null, null, null, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -1956,7 +1956,7 @@
astFactory.createNewDescriptor(
newPlacementExpressions,
newTypeIdExpressions,
- newInitializerExpressions), null);
+ newInitializerExpressions), (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -2026,7 +2026,7 @@
IASTExpression.Kind.NEW_TYPEID, null, null, null, typeId,
null, EMPTY_STRING, astFactory.createNewDescriptor(
newPlacementExpressions, newTypeIdExpressions,
- newInitializerExpressions), null);
+ newInitializerExpressions), (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
return null;
@@ -2108,7 +2108,7 @@
try {
return astFactory.createExpression(scope,
IASTExpression.Kind.UNARY_SIZEOF_TYPEID, null,
- null, null, d, null, EMPTY_STRING, null, null);
+ null, null, d, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -2119,7 +2119,7 @@
return astFactory.createExpression(scope,
IASTExpression.Kind.UNARY_SIZEOF_UNARYEXPRESSION,
unaryExpression, null, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e1) {
throwBacktrack(e1.getProblem());
} catch (Exception e) {
@@ -2198,7 +2198,7 @@
? IASTExpression.Kind.POSTFIX_TYPENAME_TEMPLATEID
: IASTExpression.Kind.POSTFIX_TYPENAME_IDENTIFIER),
expressionList, null, null, null,
- nestedName, EMPTY_STRING, null, null);
+ nestedName, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException ase) {
throwBacktrack(ase.getProblem());
} catch (Exception e) {
@@ -2290,7 +2290,7 @@
? IASTExpression.Kind.POSTFIX_TYPEID_TYPEID
: IASTExpression.Kind.POSTFIX_TYPEID_EXPRESSION),
lhs, null, null, typeId, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e6) {
throwBacktrack(e6.getProblem());
} catch (Exception e) {
@@ -2320,7 +2320,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.POSTFIX_SUBSCRIPT,
firstExpression, secondExpression, null, null,
- null, EMPTY_STRING, null, null);
+ null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e2) {
throwBacktrack(e2.getProblem());
} catch (Exception e) {
@@ -2364,7 +2364,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.POSTFIX_FUNCTIONCALL,
firstExpression, secondExpression, null, null,
- null, EMPTY_STRING, null, null);
+ null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e3) {
throwBacktrack(e3.getProblem());
} catch (Exception e) {
@@ -2379,7 +2379,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.POSTFIX_INCREMENT,
firstExpression, null, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e1) {
throwBacktrack(e1.getProblem());
} catch (Exception e) {
@@ -2394,7 +2394,7 @@
firstExpression = astFactory.createExpression(scope,
IASTExpression.Kind.POSTFIX_DECREMENT,
firstExpression, null, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e4) {
throwBacktrack(e4.getProblem());
} catch (Exception e) {
@@ -2432,7 +2432,7 @@
firstExpression = astFactory.createExpression(scope,
memberCompletionKind, firstExpression,
secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e5) {
throwBacktrack(e5.getProblem());
} catch (Exception e) {
@@ -2469,7 +2469,7 @@
firstExpression = astFactory.createExpression(scope,
arrowCompletionKind, firstExpression,
secondExpression, null, null, null,
- EMPTY_STRING, null, null);
+ EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -2516,7 +2516,6 @@
int startingOffset = la.getOffset();
int line = la.getLineNumber();
char [] fn = la.getFilename();
- la = null;
char[] typeName = consume().getCharImage();
consume(IToken.tLPAREN);
setCurrentFunctionName(typeName);
@@ -2526,7 +2525,7 @@
int endOffset = consume(IToken.tRPAREN).getEndOffset();
try {
return astFactory.createExpression(scope, type, inside, null, null,
- null, null, EMPTY_STRING, null, null);
+ null, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -2759,7 +2758,7 @@
int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0;
try {
return astFactory.createExpression(scope, kind, lhs,
- assignmentExpression, null, null, null, EMPTY_STRING, null, null);
+ assignmentExpression, null, null, null, EMPTY_STRING, null, (ITokenDuple)t);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -2777,13 +2776,12 @@
int startingOffset = la.getOffset();
int line = la.getLineNumber();
char [] fn = la.getFilename();
- la = null;
IASTExpression castExpression = castExpression(scope, completionKind,
key);
int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0;
try {
return astFactory.createExpression(scope, kind, castExpression,
- null, null, null, null, EMPTY_STRING, null, null);
+ null, null, null, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
@@ -2800,7 +2798,6 @@
int startingOffset = la.getOffset();
int line = la.getLineNumber();
char [] fn = la.getFilename();
- la = null;
consume();
consume(IToken.tLT);
@@ -2812,7 +2809,7 @@
int endOffset = consume(IToken.tRPAREN).getEndOffset();
try {
return astFactory.createExpression(scope, kind, lhs, null, null,
- duple, null, EMPTY_STRING, null, null);
+ duple, null, EMPTY_STRING, null, (ITokenDuple)la);
} catch (ASTSemanticException e) {
throwBacktrack(e.getProblem());
} catch (Exception e) {
Index: parser/org/eclipse/cdt/internal/core/parser/ParserMessages.properties
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserMessages.properties,v
retrieving revision 1.7
diff -u -r1.7 ParserMessages.properties
--- parser/org/eclipse/cdt/internal/core/parser/ParserMessages.properties 20 Oct 2004 17:59:54 -0000 1.7
+++ parser/org/eclipse/cdt/internal/core/parser/ParserMessages.properties 19 Nov 2004 20:45:41 -0000
@@ -57,6 +57,7 @@
ASTProblemFactory.error.semantic.nameNotFound=Attempt to use symbol failed : {0}
ASTProblemFactory.error.semantic.nameNotProvided=Name not provided.
ASTProblemFactory.error.semantic.invalidConversionType=Invalid arithmetic conversion
+ASTProblemFactory.error.semantic.malformedExpression=Malformed expression
LineOffsetReconciler.error.couldNotResetReader=Could not reset Reader
Index: parser/org/eclipse/cdt/internal/core/parser/problem/Problem.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/problem/Problem.java,v
retrieving revision 1.11
diff -u -r1.11 Problem.java
--- parser/org/eclipse/cdt/internal/core/parser/problem/Problem.java 18 Nov 2004 16:10:21 -0000 1.11
+++ parser/org/eclipse/cdt/internal/core/parser/problem/Problem.java 19 Nov 2004 20:45:42 -0000
@@ -113,6 +113,9 @@
new Integer( IProblem.SEMANTIC_INVALID_CONVERSION_TYPE ),
ParserMessages.getString("ASTProblemFactory.error.semantic.invalidConversionType")); //$NON-NLS-1$
errorMessages.put(
+ new Integer( IProblem.SEMANTIC_MALFORMED_EXPRESSION ),
+ ParserMessages.getString("ASTProblemFactory.error.semantic.malformedExpression")); //$NON-NLS-1$
+ errorMessages.put(
new Integer( IProblem.SEMANTIC_AMBIGUOUS_LOOKUP ),
ParserMessages.getString("ASTProblemFactory.error.semantic.pst.ambiguousLookup")); //$NON-NLS-1$
errorMessages.put(