From 581182ce98fb757fe738d260b42668d1520d612e Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Mon, 13 Mar 2017 18:56:42 -0700 Subject: [PATCH] Minor performance optimization. Change-Id: I19b1b8f55c8b62fa95eede5318d4b73291dfbd70 --- .../cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java index 79c92842de8..5432eadb7ec 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java @@ -44,6 +44,7 @@ import org.eclipse.cdt.core.dom.ast.IArrayType; import org.eclipse.cdt.core.dom.ast.IBasicType; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IPointerType; +import org.eclipse.cdt.core.dom.ast.IProblemBinding; import org.eclipse.cdt.core.dom.ast.ISemanticProblem; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; @@ -388,6 +389,9 @@ public class EvalUnary extends CPPDependentEvaluation { if (argument == fArgument && binding == fAddressOfQualifiedNameBinding) return this; + if (binding instanceof IProblemBinding) + return EvalFixed.INCOMPLETE; + return new EvalUnary(fOperator, argument, binding, getTemplateDefinition()); }