diff options
author | Hansruedi Patzen | 2018-09-10 16:06:37 +0000 |
---|---|---|
committer | Nathan Ridge | 2018-09-17 05:25:45 +0000 |
commit | b8618b166aafc647fb1daf1ce43d653ffb4b99ca (patch) | |
tree | ec14d0f8219c41610b9d4fc769bf12778db56373 /core/org.eclipse.cdt.core/parser | |
parent | 5042be3a36372df9f321518929804a97f0f7cb19 (diff) | |
download | org.eclipse.cdt-b8618b166aafc647fb1daf1ce43d653ffb4b99ca.tar.gz org.eclipse.cdt-b8618b166aafc647fb1daf1ce43d653ffb4b99ca.tar.xz org.eclipse.cdt-b8618b166aafc647fb1daf1ce43d653ffb4b99ca.zip |
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>
Diffstat (limited to 'core/org.eclipse.cdt.core/parser')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java index e687c0ed4c6..9dbe99f8804 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java @@ -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(); |