mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-29 19:23:38 +02:00
Partial fix for bug 62359
This commit is contained in:
parent
e22d8fbc58
commit
1ce41b077c
2 changed files with 7 additions and 2 deletions
|
@ -33,7 +33,7 @@ public class DefaultProblemHandler
|
||||||
case IProblem.PREPROCESSOR_POUND_ERROR:
|
case IProblem.PREPROCESSOR_POUND_ERROR:
|
||||||
case IProblem.PREPROCESSOR_UNBALANCE_CONDITION:
|
case IProblem.PREPROCESSOR_UNBALANCE_CONDITION:
|
||||||
case IProblem.PREPROCESSOR_INVALID_MACRO_DEFN:
|
case IProblem.PREPROCESSOR_INVALID_MACRO_DEFN:
|
||||||
case IProblem.PREPROCESSOR_MACRO_USAGE_ERROR:
|
// case IProblem.PREPROCESSOR_MACRO_USAGE_ERROR:
|
||||||
case IProblem.PREPROCESSOR_MACRO_PASTING_ERROR:
|
case IProblem.PREPROCESSOR_MACRO_PASTING_ERROR:
|
||||||
case IProblem.PREPROCESSOR_CONDITIONAL_EVAL_ERROR:
|
case IProblem.PREPROCESSOR_CONDITIONAL_EVAL_ERROR:
|
||||||
case IProblem.SCANNER_UNEXPECTED_EOF:
|
case IProblem.SCANNER_UNEXPECTED_EOF:
|
||||||
|
|
|
@ -156,6 +156,11 @@ public class ASTExpression implements IASTExpression {
|
||||||
if( getExpressionKind() == IASTExpression.Kind.LOGICALOREXPRESSION )
|
if( getExpressionKind() == IASTExpression.Kind.LOGICALOREXPRESSION )
|
||||||
return( ( getLHSExpression().evaluateExpression() != 0 ) || ( getRHSExpression().evaluateExpression() != 0 ) ) ? 1 : 0 ;
|
return( ( getLHSExpression().evaluateExpression() != 0 ) || ( getRHSExpression().evaluateExpression() != 0 ) ) ? 1 : 0 ;
|
||||||
|
|
||||||
|
if( getExpressionKind() == IASTExpression.Kind.CONDITIONALEXPRESSION )
|
||||||
|
{
|
||||||
|
return ( getLHSExpression().evaluateExpression() != 0 ) ? getRHSExpression().evaluateExpression() : getThirdExpression().evaluateExpression();
|
||||||
|
}
|
||||||
|
|
||||||
throw new ASTExpressionEvaluationException();
|
throw new ASTExpressionEvaluationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue