Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2017-01-31 19:03:37 -0500
committerNathan Ridge2017-02-10 15:08:06 -0500
commit827a743f97e5368b318c9de736454a11454f366f (patch)
treedab822fc7f9679e6ca889f25bc0a45515c285c28
parentfcd3f62d316282789ca7c79294861e289f7d7de9 (diff)
downloadorg.eclipse.cdt-827a743f97e5368b318c9de736454a11454f366f.tar.gz
org.eclipse.cdt-827a743f97e5368b318c9de736454a11454f366f.tar.xz
org.eclipse.cdt-827a743f97e5368b318c9de736454a11454f366f.zip
Bug 511429 - Handle TypeOfDependentExpression in PDOMCPPLinkage.unmarshalBinding()
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
index 958cdc7a66..12b4414d8c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
@@ -35,6 +35,7 @@ import org.eclipse.cdt.core.dom.ast.IFunction;
import org.eclipse.cdt.core.dom.ast.IParameter;
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.ISemanticProblem;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
import org.eclipse.cdt.core.dom.ast.IValue;
@@ -89,6 +90,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation;
import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution;
import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer;
+import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding;
import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPArrayType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType;
@@ -1551,9 +1553,14 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
return CPPDeferredClassInstance.unmarshal(getPDOM(), firstBytes, buffer);
case ITypeMarshalBuffer.DEFERRED_FUNCTION:
return CPPDeferredFunction.unmarshal(firstBytes, buffer);
+ case ITypeMarshalBuffer.DEPENDENT_EXPRESSION_TYPE:
+ IType type= TypeOfDependentExpression.unmarshal(firstBytes, buffer);
+ if (type instanceof IBinding)
+ return (IBinding) type;
+ return new ProblemBinding(null, ISemanticProblem.TYPE_NOT_PERSISTED);
}
- throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal a type, first bytes=" + firstBytes)); //$NON-NLS-1$
+ throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal a binding, first bytes=" + firstBytes)); //$NON-NLS-1$
}
@Override

Back to the top