1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 00:36:16 +02:00

Bug 511429 - Handle TypeOfDependentExpression in PDOMCPPLinkage.unmarshalBinding()

Change-Id: I2eca438be88bb0d78dae5f511fa1fde46965fa65
This commit is contained in:
Nathan Ridge 2017-01-31 19:03:37 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 5babeafa31
commit 8c7c06646b

View file

@ -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;
@ -87,6 +88,7 @@ import org.eclipse.cdt.internal.core.Util;
import org.eclipse.cdt.internal.core.dom.ast.tag.TagManager;
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
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;
@ -1562,9 +1564,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