mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Do not store function return expressions in the index.
They have been superseded by function body executions. Change-Id: I5f4e23a8f8be50f4a034b05d2e85ca2f8a9d2bd7
This commit is contained in:
parent
f78def7afb
commit
ee3c2f0776
10 changed files with 13 additions and 161 deletions
|
@ -167,11 +167,6 @@ public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPDeferr
|
|||
return fOwner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPExecution getFunctionBodyExecution(IASTNode point) {
|
||||
return null;
|
||||
|
|
|
@ -18,18 +18,14 @@ import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUti
|
|||
import org.eclipse.cdt.core.dom.ILinkage;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTInitializerClause;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
|
@ -55,7 +51,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ProblemFunctionType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
|
||||
import org.eclipse.core.runtime.PlatformObject;
|
||||
|
||||
|
@ -671,51 +666,6 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
|
|||
return dtor != null && AttributeUtil.hasNoreturnAttribute(dtor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point) {
|
||||
if (!isConstexpr())
|
||||
return null;
|
||||
if (definition == null)
|
||||
return EvalFixed.INCOMPLETE;
|
||||
|
||||
IASTNode node = ASTQueries.findOutermostDeclarator(definition).getParent();
|
||||
return getReturnExpression((IASTFunctionDefinition) node);
|
||||
}
|
||||
|
||||
static ICPPEvaluation getReturnExpression(IASTFunctionDefinition functionDefinition) {
|
||||
IASTReturnStatement returnStatement = null;
|
||||
// Make sure ambiguity resolution has been performed on the function body, even
|
||||
// if it's a class method and we're still processing the class declaration.
|
||||
((ASTNode) functionDefinition).resolvePendingAmbiguities();
|
||||
IASTStatement body = functionDefinition.getBody();
|
||||
if (body instanceof IASTReturnStatement) {
|
||||
returnStatement = (IASTReturnStatement) body;
|
||||
} else if (body instanceof IASTCompoundStatement) {
|
||||
for (IASTStatement statement : ((IASTCompoundStatement) body).getStatements()) {
|
||||
if (statement instanceof IASTReturnStatement) {
|
||||
if (returnStatement != null)
|
||||
return EvalFixed.INCOMPLETE;
|
||||
returnStatement = (IASTReturnStatement) statement;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (returnStatement == null)
|
||||
return EvalFixed.INCOMPLETE; // constexpr constructors are not supported yet.
|
||||
|
||||
IASTInitializerClause returnExpression = returnStatement.getReturnArgument();
|
||||
if (returnExpression instanceof ICPPEvaluationOwner)
|
||||
return ((ICPPEvaluationOwner) returnExpression).getEvaluation();
|
||||
|
||||
return EvalFixed.INCOMPLETE;
|
||||
}
|
||||
|
||||
public static ICPPEvaluation getReturnExpression(ICPPFunction function, IASTNode point) {
|
||||
if (function instanceof ICPPComputableFunction) {
|
||||
return ((ICPPComputableFunction) function).getReturnExpression(point);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ICPPExecution getFunctionBodyExecution(ICPPFunction function, IASTNode point) {
|
||||
if (function instanceof ICPPComputableFunction) {
|
||||
return ((ICPPComputableFunction) function).getFunctionBodyExecution(point);
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
|
@ -36,7 +35,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap;
|
|||
import org.eclipse.cdt.core.index.IIndexBinding;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.IntegralValue;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
||||
|
||||
|
@ -321,30 +319,6 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
|
|||
return fExceptionSpecs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point) {
|
||||
if (!isConstexpr())
|
||||
return null;
|
||||
|
||||
IASTNode def = getDefinition();
|
||||
if (def != null) {
|
||||
ICPPASTFunctionDefinition functionDefinition = CPPFunction.getFunctionDefinition(def);
|
||||
return CPPFunction.getReturnExpression(functionDefinition);
|
||||
}
|
||||
IBinding f = getSpecializedBinding();
|
||||
if (f instanceof ICPPComputableFunction) {
|
||||
ICPPEvaluation eval = ((ICPPComputableFunction) f).getReturnExpression(point);
|
||||
if (eval != null) {
|
||||
ICPPClassSpecialization within = CPPTemplates.getSpecializationContext(getOwner());
|
||||
InstantiationContext context =
|
||||
new InstantiationContext(getTemplateParameterMap(), within, point);
|
||||
eval = eval.instantiate(context, IntegralValue.MAX_RECURSION_DEPTH);
|
||||
}
|
||||
return eval;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPExecution getFunctionBodyExecution(IASTNode point) {
|
||||
if (!isConstexpr()) {
|
||||
|
|
|
@ -42,7 +42,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ProblemFunctionType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
|
||||
|
||||
/**
|
||||
|
@ -437,16 +436,6 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point) {
|
||||
if (!isConstexpr())
|
||||
return null;
|
||||
ICPPASTFunctionDefinition functionDefinition = CPPFunction.getFunctionDefinition(getDefinition());
|
||||
if (functionDefinition == null)
|
||||
return EvalFixed.INCOMPLETE;
|
||||
return CPPFunction.getReturnExpression(functionDefinition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPExecution getFunctionBodyExecution(IASTNode point) {
|
||||
if (!isConstexpr()) {
|
||||
|
|
|
@ -16,13 +16,6 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
|
|||
* Represents a function whose executing may be simulated at parsing time.
|
||||
*/
|
||||
public interface ICPPComputableFunction {
|
||||
/**
|
||||
* For a constexpr function returns the return statement expression. Otherwise returns
|
||||
* {@code null}.
|
||||
* @param point the point of instantiation for name lookups
|
||||
*/
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point);
|
||||
|
||||
/**
|
||||
* For a constexpr function returns the ICPPExecution for its body. Otherwise returns
|
||||
* {@code null}.
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunction;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPComputableFunction;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
|
||||
import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory;
|
||||
|
@ -140,11 +139,6 @@ class CompositeCPPFunction extends CompositeCPPBinding implements ICPPFunction,
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point) {
|
||||
return CPPFunction.getReturnExpression((ICPPFunction) rbinding, point);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPExecution getFunctionBodyExecution(IASTNode point) {
|
||||
return CPPFunction.getFunctionBodyExecution((ICPPFunction) rbinding, point);
|
||||
|
|
|
@ -274,11 +274,12 @@ public class PDOM extends PlatformObject implements IPDOM {
|
|||
*
|
||||
* CDT 9.2 development (versions not supported on the 9.0.x branch)
|
||||
* 202.0 - C++14 constexpr evaluation, bug 490475.
|
||||
* 202.0 - Use 16 bits to store field position, bug 501616.
|
||||
* 203.0 - Use 16 bits to store field position, bug 501616.
|
||||
* 204.0 - Do not store return expression in index, follow-up to bug 490475.
|
||||
*/
|
||||
private static final int MIN_SUPPORTED_VERSION= version(203, 0);
|
||||
private static final int MAX_SUPPORTED_VERSION= version(203, Short.MAX_VALUE);
|
||||
private static final int DEFAULT_VERSION = version(203, 0);
|
||||
private static final int MIN_SUPPORTED_VERSION= version(204, 0);
|
||||
private static final int MAX_SUPPORTED_VERSION= version(204, Short.MAX_VALUE);
|
||||
private static final int DEFAULT_VERSION = version(204, 0);
|
||||
|
||||
private static int version(int major, int minor) {
|
||||
return (major << 16) + minor;
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.ProblemFunctionType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunction;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPComputableFunction;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
|
||||
import org.eclipse.cdt.internal.core.index.IndexCPPSignatureUtil;
|
||||
|
@ -81,11 +80,8 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
/** Offset of the number of the required arguments. */
|
||||
private static final int REQUIRED_ARG_COUNT = ANNOTATION + 2; // short
|
||||
|
||||
/** Offset of the return expression for constexpr functions. */
|
||||
private static final int RETURN_EXPRESSION = REQUIRED_ARG_COUNT + 2; // Database.EVALUATION_SIZE
|
||||
|
||||
/** Offset of the function body execution for constexpr functions. */
|
||||
private static final int FUNCTION_BODY = RETURN_EXPRESSION + Database.EVALUATION_SIZE; // Database.EXECUTION_SIZE
|
||||
private static final int FUNCTION_BODY = REQUIRED_ARG_COUNT + 2; // Database.EXECUTION_SIZE
|
||||
|
||||
/**
|
||||
* The size in bytes of a PDOMCPPFunction record in the database.
|
||||
|
@ -125,12 +121,11 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
}
|
||||
|
||||
public void initData(ICPPFunctionType ftype, ICPPParameter[] params, IType[] exceptionSpec,
|
||||
ICPPEvaluation returnExpression, ICPPExecution functionBody) {
|
||||
ICPPExecution functionBody) {
|
||||
try {
|
||||
setType(ftype);
|
||||
setParameters(params);
|
||||
storeExceptionSpec(exceptionSpec);
|
||||
getLinkage().storeEvaluation(record + RETURN_EXPRESSION, returnExpression);
|
||||
getLinkage().storeExecution(record + FUNCTION_BODY, functionBody);
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
|
@ -191,7 +186,6 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
if (oldRec != 0) {
|
||||
PDOMCPPTypeList.clearTypes(this, oldRec);
|
||||
}
|
||||
linkage.storeEvaluation(record + RETURN_EXPRESSION, CPPFunction.getReturnExpression(func, point));
|
||||
linkage.storeExecution(record + FUNCTION_BODY, CPPFunction.getFunctionBodyExecution(func, point));
|
||||
}
|
||||
|
||||
|
@ -422,19 +416,6 @@ class PDOMCPPFunction extends PDOMCPPBinding implements ICPPFunction, IPDOMOverl
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point) {
|
||||
if (!isConstexpr())
|
||||
return null;
|
||||
|
||||
try {
|
||||
return (ICPPEvaluation) getLinkage().loadEvaluation(record + RETURN_EXPRESSION);
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPExecution getFunctionBodyExecution(IASTNode point) {
|
||||
if (!isConstexpr())
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ProblemFunctionType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPComputableFunction;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
|
||||
import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants;
|
||||
|
@ -71,11 +70,8 @@ class PDOMCPPFunctionSpecialization extends PDOMCPPSpecialization
|
|||
/** Offset of the number of the required arguments. */
|
||||
private static final int REQUIRED_ARG_COUNT = ANNOTATION + 2; // short
|
||||
|
||||
/** Offset of the return expression for constexpr functions. */
|
||||
private static final int RETURN_EXPRESSION = REQUIRED_ARG_COUNT + 2; // Database.EVALUATION_SIZE
|
||||
|
||||
/** Offset of the function body execution for constexpr functions. */
|
||||
private static final int FUNCTION_BODY = RETURN_EXPRESSION + Database.EVALUATION_SIZE; // Database.EXECUTION_SIZE
|
||||
private static final int FUNCTION_BODY = REQUIRED_ARG_COUNT + 2; // Database.EXECUTION_SIZE
|
||||
|
||||
/**
|
||||
* The size in bytes of a PDOMCPPFunctionSpecialization record in the database.
|
||||
|
@ -161,11 +157,10 @@ class PDOMCPPFunctionSpecialization extends PDOMCPPSpecialization
|
|||
super(linkage, bindingRecord);
|
||||
}
|
||||
|
||||
public void initData(ICPPEvaluation returnExpression, ICPPExecution functionBody) {
|
||||
if (returnExpression == null && functionBody == null)
|
||||
public void initData(ICPPExecution functionBody) {
|
||||
if (functionBody == null)
|
||||
return;
|
||||
try {
|
||||
getLinkage().storeEvaluation(record + RETURN_EXPRESSION, returnExpression);
|
||||
getLinkage().storeExecution(record + FUNCTION_BODY, functionBody);
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
|
@ -340,19 +335,6 @@ class PDOMCPPFunctionSpecialization extends PDOMCPPSpecialization
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPEvaluation getReturnExpression(IASTNode point) {
|
||||
if (!isConstexpr())
|
||||
return null;
|
||||
|
||||
try {
|
||||
return (ICPPEvaluation) getLinkage().loadEvaluation(record + RETURN_EXPRESSION);
|
||||
} catch (CoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICPPExecution getFunctionBodyExecution(IASTNode point) {
|
||||
if (!isConstexpr())
|
||||
|
|
|
@ -108,7 +108,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClassInstance;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMember;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalEnumerator;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding;
|
||||
|
@ -275,7 +274,6 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
private final ICPPFunctionType fOriginalFunctionType;
|
||||
private final ICPPParameter[] fOriginalParameters;
|
||||
private final IType[] fOriginalExceptionSpec;
|
||||
private final ICPPEvaluation fReturnExpression;
|
||||
private final ICPPExecution fFunctionBody;
|
||||
|
||||
public ConfigureFunction(ICPPFunction original, PDOMCPPFunction function, IASTNode point)
|
||||
|
@ -284,7 +282,6 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
fOriginalFunctionType= original.getType();
|
||||
fOriginalParameters= original.getParameters();
|
||||
fOriginalExceptionSpec= function.extractExceptionSpec(original);
|
||||
fReturnExpression= CPPFunction.getReturnExpression(original, point);
|
||||
fFunctionBody = CPPFunction.getFunctionBodyExecution(original, point);
|
||||
postProcesses.add(this);
|
||||
}
|
||||
|
@ -292,7 +289,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
@Override
|
||||
public void run() {
|
||||
fFunction.initData(fOriginalFunctionType, fOriginalParameters, fOriginalExceptionSpec,
|
||||
fReturnExpression, fFunctionBody);
|
||||
fFunctionBody);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,19 +311,17 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
|
||||
class ConfigureFunctionSpecialization implements Runnable {
|
||||
private final PDOMCPPFunctionSpecialization fSpec;
|
||||
private final ICPPEvaluation fReturnExpression;
|
||||
private final ICPPExecution fFunctionBody;
|
||||
|
||||
public ConfigureFunctionSpecialization(ICPPFunction original, PDOMCPPFunctionSpecialization spec, IASTNode point) {
|
||||
fSpec = spec;
|
||||
fReturnExpression = CPPFunction.getReturnExpression(original, point);
|
||||
fFunctionBody = CPPFunction.getFunctionBodyExecution(original, point);
|
||||
postProcesses.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
fSpec.initData(fReturnExpression, fFunctionBody);
|
||||
fSpec.initData(fFunctionBody);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -387,7 +382,6 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
private final ICPPFunctionType fOriginalFunctionType;
|
||||
private final ICPPParameter[] fOriginalParameters;
|
||||
private final IType[] fOriginalExceptionSpec;
|
||||
private final ICPPEvaluation fReturnExpression;
|
||||
private final ICPPExecution fFunctionBody;
|
||||
|
||||
public ConfigureFunctionTemplate(ICPPFunctionTemplate original, PDOMCPPFunctionTemplate template,
|
||||
|
@ -398,7 +392,6 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
fOriginalFunctionType= original.getType();
|
||||
fOriginalParameters= original.getParameters();
|
||||
fOriginalExceptionSpec= template.extractExceptionSpec(original);
|
||||
fReturnExpression= CPPFunction.getReturnExpression(original, point);
|
||||
fFunctionBody = CPPFunction.getFunctionBodyExecution(original, point);
|
||||
postProcesses.add(this);
|
||||
}
|
||||
|
@ -411,7 +404,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
tp.configure(fOriginalTemplateParameters[i]);
|
||||
}
|
||||
fTemplate.initData(fOriginalFunctionType, fOriginalParameters, fOriginalExceptionSpec,
|
||||
fReturnExpression, fFunctionBody);
|
||||
fFunctionBody);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue