mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
Bug 510152: ParserException in ASTAmbiguousNode.logAmbiguousNodeError
If the fOperand of an CPPASTUnaryExpression is an ASTAmbiguousNode the fOperand.getEvaluation() call will always fail and log an error. Change-Id: Ie17c2685636e8956bf4724c206092cf0370ff5d9 Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
This commit is contained in:
parent
5042be3a36
commit
b8618b166a
1 changed files with 2 additions and 1 deletions
|
@ -31,6 +31,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPEvaluation;
|
||||
|
@ -201,7 +202,7 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
|
|||
}
|
||||
|
||||
private ICPPEvaluation computeEvaluation() {
|
||||
if (fOperand == null)
|
||||
if (fOperand == null || fOperand instanceof ASTAmbiguousNode)
|
||||
return EvalFixed.INCOMPLETE;
|
||||
|
||||
final ICPPEvaluation nestedEval = fOperand.getEvaluation();
|
||||
|
|
Loading…
Add table
Reference in a new issue