Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2017-02-16 00:25:45 -0500
committerNathan Ridge2017-02-17 00:06:56 -0500
commit50e3f134593ce11710cd6524cbfdcdbabe75c639 (patch)
tree0416cf4545d5e1c556ef780f614ccd53341afa6a
parent1ddcfa1856a0d706a024da343f251d9f45bba8ba (diff)
downloadorg.eclipse.cdt-50e3f134593ce11710cd6524cbfdcdbabe75c639.tar.gz
org.eclipse.cdt-50e3f134593ce11710cd6524cbfdcdbabe75c639.tar.xz
org.eclipse.cdt-50e3f134593ce11710cd6524cbfdcdbabe75c639.zip
Bug 512262 - Remove the unnecessary ICPPEvaluationOwner interface
This also fixes some ClassCastExceptions caused by types which implemented ICPPASTInitializerClause but not ICPPEvaluationOwner. Change-Id: Ie624865ebe476fe760dc28e02b6aef8a43b4c621
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/constexprevaluation/TestBase.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java11
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java5
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java17
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java5
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java3
46 files changed, 104 insertions, 112 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/constexprevaluation/TestBase.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/constexprevaluation/TestBase.java
index 79694ecff1..7868050fa3 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/constexprevaluation/TestBase.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/constexprevaluation/TestBase.java
@@ -40,7 +40,6 @@ import org.eclipse.cdt.internal.core.dom.parser.CStringValue;
import org.eclipse.cdt.internal.core.dom.parser.FloatingPointValue;
import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
import org.eclipse.cdt.internal.core.parser.ParserException;
import org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor;
@@ -102,7 +101,7 @@ public class TestBase extends IndexBindingResolutionTestBase {
private IValue getValue() throws Exception {
ICPPASTInitializerClause point = getLastDeclarationInitializer();
- ICPPEvaluation evaluation = ((ICPPEvaluationOwner) point).getEvaluation();
+ ICPPEvaluation evaluation = point.getEvaluation();
return evaluation.getValue(point);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java
index 3ef448f40c..7d1245e759 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java
@@ -55,13 +55,13 @@ import org.eclipse.cdt.core.dom.ast.IEnumerator;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.IValue;
import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleTypeConstructorExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter;
import org.eclipse.cdt.internal.core.dom.parser.SizeofCalculator.SizeAndAlignment;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
@@ -80,8 +80,8 @@ public class ValueFactory {
return val;
}
- if (expr instanceof ICPPEvaluationOwner) {
- ICPPEvaluation evaluation = ((ICPPEvaluationOwner) expr).getEvaluation();
+ if (expr instanceof ICPPASTInitializerClause) {
+ ICPPEvaluation evaluation = ((ICPPASTInitializerClause) expr).getEvaluation();
return evaluation.getValue(expr);
}
return IntegralValue.UNKNOWN;
@@ -601,8 +601,8 @@ public class ValueFactory {
return val.numberValue();
}
- if (expr instanceof ICPPEvaluationOwner) {
- ICPPEvaluation eval = ((ICPPEvaluationOwner) expr).getEvaluation();
+ if (expr instanceof ICPPASTInitializerClause) {
+ ICPPEvaluation eval = ((ICPPASTInitializerClause) expr).getEvaluation();
if (eval.isConstantExpression(expr) && !eval.isValueDependent())
return eval.getValue(expr).numberValue();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java
index fd0782ce1d..a8802c0c80 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java
@@ -51,7 +51,6 @@ import org.eclipse.cdt.core.dom.ast.IVariable;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTRangeBasedForStatement;
import org.eclipse.cdt.core.dom.ast.gnu.IGNUASTCompoundStatementExpression;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMName;
/**
@@ -214,7 +213,7 @@ public abstract class VariableReadWriteFlags {
private IType getArgumentType(IASTInitializerClause argument) {
if (argument instanceof ICPPASTInitializerClause) {
- return ((ICPPEvaluationOwner) argument).getEvaluation().getType(argument);
+ return ((ICPPASTInitializerClause) argument).getEvaluation().getType(argument);
} else if (argument instanceof IASTExpression) {
return ((IASTExpression) argument).getExpressionType();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java
index 24326ae4b6..bc77205047 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java
@@ -32,7 +32,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinary;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
public class CPPASTArraySubscriptExpression extends ASTNode
- implements ICPPASTArraySubscriptExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+ implements ICPPASTArraySubscriptExpression, IASTAmbiguityParent {
private ICPPASTExpression arrayExpression;
private ICPPASTInitializerClause subscriptExp;
private ICPPEvaluation evaluation;
@@ -196,8 +196,8 @@ public class CPPASTArraySubscriptExpression extends ASTNode
if (arrayExpression == null || subscriptExp == null)
return EvalFixed.INCOMPLETE;
return new EvalBinary(EvalBinary.op_arrayAccess,
- ((ICPPEvaluationOwner) arrayExpression).getEvaluation(),
- ((ICPPEvaluationOwner) subscriptExp).getEvaluation(),
+ arrayExpression.getEvaluation(),
+ subscriptExp.getEvaluation(),
this);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java
index 54a761b2c5..3be6826d0d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java
@@ -36,7 +36,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinary;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
-public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpression, IASTAmbiguityParent {
private int fOperator;
private ICPPASTExpression fOperand1;
private ICPPASTInitializerClause fOperand2;
@@ -280,8 +280,8 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
if (fOperand1 == null || fOperand2 == null)
return EvalFixed.INCOMPLETE;
- ICPPEvaluation eval1 = ((ICPPEvaluationOwner) fOperand1).getEvaluation();
- ICPPEvaluation eval2 = ((ICPPEvaluationOwner) fOperand2).getEvaluation();
+ ICPPEvaluation eval1 = fOperand1.getEvaluation();
+ ICPPEvaluation eval2 = fOperand2.getEvaluation();
return new EvalBinary(fOperator, eval1, eval2, this);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java
index f453b73c6d..b6c8c27870 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java
@@ -25,7 +25,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinaryTypeId;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
-public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpression, IASTBinaryTypeIdExpression, ICPPEvaluationOwner {
+public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpression, IASTBinaryTypeIdExpression {
private Operator fOperator;
private IASTTypeId fOperand1;
private IASTTypeId fOperand2;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java
index c12b8715db..e8cf4e1cae 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java
@@ -15,6 +15,7 @@ import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.IASTCaseStatement;
import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecCase;
/**
@@ -93,7 +94,7 @@ public class CPPASTCaseStatement extends CPPASTAttributeOwner implements IASTCas
@Override
public ICPPExecution getExecution() {
- ICPPEvaluationOwner caseExpr = (ICPPEvaluationOwner) getExpression();
+ ICPPASTExpression caseExpr = (ICPPASTExpression) getExpression();
ICPPEvaluation caseExprEval = caseExpr.getEvaluation();
return new ExecCase(caseExprEval);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java
index cf4807b038..d45aa93248 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java
@@ -33,7 +33,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalTypeId;
/**
* Cast expression for C++
*/
-public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpression, IASTAmbiguityParent {
private int fOperator;
private ICPPASTExpression fOperand;
private IASTTypeId fTypeId;
@@ -167,7 +167,7 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
if (type == null || type instanceof IProblemType)
return EvalFixed.INCOMPLETE;
- return new EvalTypeId(type, this, false, ((ICPPEvaluationOwner) fOperand).getEvaluation());
+ return new EvalTypeId(type, this, false, fOperand.getEvaluation());
}
@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java
index 826e74953f..d573639446 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java
@@ -31,7 +31,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
* Gnu-extension: ({ ... })
*/
public class CPPASTCompoundStatementExpression extends ASTNode
- implements IGNUASTCompoundStatementExpression, ICPPASTExpression, ICPPEvaluationOwner {
+ implements IGNUASTCompoundStatementExpression, ICPPASTExpression {
private IASTCompoundStatement fStatement;
private ICPPEvaluation fEval;
private IASTImplicitDestructorName[] fImplicitDestructorNames;
@@ -79,8 +79,8 @@ public class CPPASTCompoundStatementExpression extends ASTNode
IASTStatement st = statements[statements.length - 1];
if (st instanceof IASTExpressionStatement) {
IASTExpressionStatement exprStmt = (IASTExpressionStatement) st;
- ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) exprStmt.getExpression();
- fEval= new EvalCompoundStatementExpression(evalOwner.getEvaluation(), this);
+ ICPPASTExpression expr = (ICPPASTExpression) exprStmt.getExpression();
+ fEval= new EvalCompoundStatementExpression(expr.getEvaluation(), this);
}
}
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java
index d7b7faf379..bae2da97dd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java
@@ -29,7 +29,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalConditional;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
public class CPPASTConditionalExpression extends ASTNode
- implements IASTConditionalExpression, ICPPASTExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+ implements IASTConditionalExpression, ICPPASTExpression, IASTAmbiguityParent {
private ICPPASTExpression fCondition;
private ICPPASTExpression fPositive;
private ICPPASTExpression fNegative;
@@ -179,9 +179,9 @@ public class CPPASTConditionalExpression extends ASTNode
if (fCondition == null || fNegative == null) {
fEval= EvalFixed.INCOMPLETE;
} else {
- final ICPPEvaluation condEval = ((ICPPEvaluationOwner) fCondition).getEvaluation();
- final ICPPEvaluation posEval = fPositive == null ? null : ((ICPPEvaluationOwner) fPositive).getEvaluation();
- final ICPPEvaluation negEval = ((ICPPEvaluationOwner) fNegative).getEvaluation();
+ final ICPPEvaluation condEval = fCondition.getEvaluation();
+ final ICPPEvaluation posEval = fPositive == null ? null : fPositive.getEvaluation();
+ final ICPPEvaluation negEval = fNegative.getEvaluation();
fEval= new EvalConditional(condEval, posEval, negEval,
isThrowExpression(fPositive), isThrowExpression(fNegative), this);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java
index 6a150cbd9f..86a77a78b7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java
@@ -57,7 +57,7 @@ public class CPPASTDecltypeSpecifier extends ASTNode
StringBuilder buffer = new StringBuilder();
buffer.append(Keywords.cDECLTYPE);
buffer.append(Keywords.cpLPAREN);
- buffer.append(((ICPPEvaluationOwner) fDecltypeExpression).getEvaluation().getSignature());
+ buffer.append(fDecltypeExpression.getEvaluation().getSignature());
buffer.append(Keywords.cpRPAREN);
final int len = buffer.length();
fSignature = new char[len];
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java
index 6467d55596..ffaed0a261 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java
@@ -33,7 +33,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.DestructorCallColl
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
-public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpression, IASTAmbiguityParent {
private static final ICPPEvaluation EVALUATION = new EvalFixed(CPPSemantics.VOID_TYPE, PRVALUE, IntegralValue.UNKNOWN);
private IASTExpression operand;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java
index d4455674fd..89f9216cd1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java
@@ -23,7 +23,7 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
* Implementation for designated initializers.
*/
public class CPPASTDesignatedInitializer extends ASTNode
- implements ICPPASTDesignatedInitializer, IASTAmbiguityParent, ICPPEvaluationOwner {
+ implements ICPPASTDesignatedInitializer, IASTAmbiguityParent {
private ICPPASTInitializerClause rhs;
private ICPPASTDesignator[] designators = ICPPASTDesignator.EMPTY_ARRAY;
private int designatorsPos;
@@ -83,7 +83,7 @@ public class CPPASTDesignatedInitializer extends ASTNode
@Override
public ICPPEvaluation getEvaluation() {
- return ((ICPPEvaluationOwner) rhs).getEvaluation();
+ return rhs.getEvaluation();
}
@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java
index 3f65bbb5bc..5909715216 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java
@@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDoStatement;
import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUtil;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecDo;
@@ -120,7 +121,7 @@ public class CPPASTDoStatement extends CPPASTAttributeOwner implements IASTDoSta
@Override
public ICPPExecution getExecution() {
- ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getCondition();
+ ICPPASTExpression conditionExpr = (ICPPASTExpression) getCondition();
ICPPEvaluation conditionEval = conditionExpr.getEvaluation();
ICPPExecution bodyExec = EvalUtil.getExecutionFromStatement(getBody());
return new ExecDo(conditionEval, bodyExec);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java
index 4aca712f35..7c708d0aed 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java
@@ -21,6 +21,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitDestructorName;
import org.eclipse.cdt.core.dom.ast.IASTImplicitName;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpressionList;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
import org.eclipse.cdt.core.parser.util.ArrayUtil;
@@ -30,7 +31,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.DestructorCallColl
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalComma;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
-public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionList, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionList, IASTAmbiguityParent {
private IASTExpression[] expressions = new IASTExpression[2];
/**
@@ -187,7 +188,7 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
ICPPEvaluation[] evals= new ICPPEvaluation[exprs.length];
for (int i = 0; i < evals.length; i++) {
- evals[i]= ((ICPPEvaluationOwner) exprs[i]).getEvaluation();
+ evals[i]= ((ICPPASTExpression) exprs[i]).getEvaluation();
}
return new EvalComma(evals, this);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java
index 8a63b50a6e..622952747e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java
@@ -15,6 +15,7 @@ import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecExpressionStatement;
/**
@@ -93,8 +94,8 @@ public class CPPASTExpressionStatement extends CPPASTAttributeOwner implements I
@Override
public ICPPExecution getExecution() {
- ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) getExpression();
- ICPPEvaluation exprEval = evalOwner.getEvaluation();
+ ICPPASTExpression expr = (ICPPASTExpression) getExpression();
+ ICPPEvaluation exprEval = expr.getEvaluation();
return new ExecExpressionStatement(exprEval);
}
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java
index ab5c84b8b1..e73c603216 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java
@@ -56,7 +56,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalMemberAccess;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
public class CPPASTFieldReference extends ASTNode
- implements ICPPASTFieldReference, IASTAmbiguityParent, ICPPASTCompletionContext, ICPPEvaluationOwner {
+ implements ICPPASTFieldReference, IASTAmbiguityParent, ICPPASTCompletionContext {
private boolean fIsTemplate;
private boolean fIsDeref;
private ICPPASTExpression fOwner;
@@ -281,7 +281,7 @@ public class CPPASTFieldReference extends ASTNode
}
private ICPPEvaluation createEvaluation() {
- ICPPEvaluation ownerEval = ((ICPPEvaluationOwner) fOwner).getEvaluation();
+ ICPPEvaluation ownerEval = fOwner.getEvaluation();
if (!ownerEval.isTypeDependent()) {
IType ownerType= EvalMemberAccess.getFieldOwnerType(ownerEval.getType(this), fIsDeref, this, null, false);
if (ownerType != null) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java
index d59ad761a0..bb4cb41468 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java
@@ -20,6 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitDestructorName;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTForStatement;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.DestructorCallCollector;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUtil;
@@ -229,11 +230,11 @@ public class CPPASTForStatement extends CPPASTAttributeOwner implements ICPPASTF
@Override
public ICPPExecution getExecution() {
ICPPExecution initializerExec = EvalUtil.getExecutionFromStatement(getInitializerStatement());
- ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getConditionExpression();
+ ICPPASTExpression conditionExpr = (ICPPASTExpression) getConditionExpression();
ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner) getConditionDeclaration();
ICPPEvaluation conditionExprEval = conditionExpr != null ? conditionExpr.getEvaluation() : null;
ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration) conditionDecl.getExecution() : null;
- ICPPEvaluationOwner iterationExpr = (ICPPEvaluationOwner) getIterationExpression();
+ ICPPASTExpression iterationExpr = (ICPPASTExpression) getIterationExpression();
ICPPEvaluation iterationEval = iterationExpr != null ? iterationExpr.getEvaluation() : null;
ICPPExecution bodyExec = EvalUtil.getExecutionFromStatement(getBody());
return new ExecFor(initializerExec, conditionExprEval, conditionDeclExec, iterationEval, bodyExec);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java
index 910bd47e05..840e8f7661 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java
@@ -34,6 +34,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFieldReference;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
@@ -49,7 +50,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalTypeId;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.LookupData;
public class CPPASTFunctionCallExpression extends ASTNode
- implements ICPPASTFunctionCallExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+ implements ICPPASTFunctionCallExpression, IASTAmbiguityParent {
private ICPPASTExpression fFunctionName;
private IASTInitializerClause[] fArguments;
@@ -281,14 +282,14 @@ public class CPPASTFunctionCallExpression extends ASTNode
return conversion;
ICPPEvaluation[] args= new ICPPEvaluation[fArguments.length + 1];
- args[0]= ((ICPPEvaluationOwner) fFunctionName).getEvaluation();
+ args[0]= fFunctionName.getEvaluation();
for (int i = 1; i < args.length; i++) {
- args[i]= ((ICPPEvaluationOwner) fArguments[i - 1]).getEvaluation();
+ args[i]= ((ICPPASTInitializerClause) fArguments[i - 1]).getEvaluation();
}
ICPPEvaluation fieldOwnerEval = null;
if (fFunctionName instanceof ICPPASTFieldReference) {
ICPPASTFieldReference fieldRef = (ICPPASTFieldReference) fFunctionName;
- ICPPEvaluationOwner fieldOwner = (ICPPEvaluationOwner) fieldRef.getFieldOwner();
+ ICPPASTExpression fieldOwner = fieldRef.getFieldOwner();
fieldOwnerEval = fieldOwner.getEvaluation();
}
return new EvalFunctionCall(args, fieldOwnerEval, this);
@@ -301,7 +302,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
if (b instanceof IType) {
ICPPEvaluation[] args= new ICPPEvaluation[fArguments.length];
for (int i = 0; i < args.length; i++) {
- args[i]= ((ICPPEvaluationOwner) fArguments[i]).getEvaluation();
+ args[i]= ((ICPPASTInitializerClause) fArguments[i]).getEvaluation();
}
return new EvalTypeId((IType) b, this, false, args);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java
index 954624d770..6ecbf14c06 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java
@@ -33,7 +33,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.FunctionSetType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
public class CPPASTIdExpression extends ASTNode
- implements IASTIdExpression, ICPPASTExpression, ICPPASTCompletionContext, ICPPEvaluationOwner {
+ implements IASTIdExpression, ICPPASTExpression, ICPPASTCompletionContext {
private IASTName fName;
private ICPPEvaluation fEvaluation;
private IASTImplicitDestructorName[] fImplicitDestructorNames;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java
index e3982757f6..1de85dcfc7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java
@@ -19,6 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTIfStatement;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUtil;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecIf;
@@ -220,7 +221,7 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
@Override
public ICPPExecution getExecution() {
- ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getConditionExpression();
+ ICPPASTExpression conditionExpr = (ICPPASTExpression) getConditionExpression();
ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner) getConditionDeclaration();
ICPPEvaluation conditionExprEval = conditionExpr != null ? conditionExpr.getEvaluation() : null;
ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration) conditionDecl.getExecution() : null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java
index d7f659fdcc..aba06e8de9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java
@@ -27,7 +27,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalInitList;
/**
* e.g.: int a[]= {1,2,3};
*/
-public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializerList, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializerList, IASTAmbiguityParent {
private static final ICPPASTInitializerClause[] NO_CLAUSES = {};
private ICPPASTInitializerClause[] initializers;
private int initializersPos= -1;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java
index 34fd12e422..9d540c73be 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java
@@ -29,7 +29,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
/**
* Implementation for lambda expressions.
*/
-public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpression, ICPPEvaluationOwner {
+public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpression {
private static final ICPPASTCapture[] NO_CAPTURES = {};
private CaptureDefault fCaptureDefault;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java
index 991ff83b38..c2b5b55d5e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java
@@ -49,7 +49,7 @@ import org.eclipse.cdt.internal.core.parser.scanner.ExpressionEvaluator.EvalExce
/**
* Represents a C++ literal.
*/
-public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralExpression, ICPPEvaluationOwner {
+public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralExpression {
private static final EvalFixed EVAL_TRUE = new EvalFixed(CPPBasicType.BOOLEAN, PRVALUE, IntegralValue.create(true));
private static final EvalFixed EVAL_FALSE = new EvalFixed(CPPBasicType.BOOLEAN, PRVALUE, IntegralValue.create(false));
private static final EvalFixed EVAL_NULL_PTR = new EvalFixed(CPPBasicType.NULL_PTR, PRVALUE, IntegralValue.create(0));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java
index 3d2972c211..113fe6eda9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java
@@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypeId;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
-public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTypeIdExpression, ICPPEvaluationOwner {
+public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTypeIdExpression {
private Operator fOperator;
private ICPPASTTypeId[] fOperands;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java
index 1ff55e5667..5c0b906445 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java
@@ -32,6 +32,7 @@ import org.eclipse.cdt.core.dom.ast.IArrayType;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorInitializer;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
@@ -48,7 +49,7 @@ import org.eclipse.core.runtime.Assert;
/**
* Represents a new expression [expr.new].
*/
-public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression, IASTAmbiguityParent {
private IASTInitializerClause[] fPlacement;
private IASTTypeId fTypeId;
private IASTInitializer fInitializer;
@@ -293,7 +294,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
IASTInitializerClause[] args = ((ICPPASTConstructorInitializer) fInitializer).getArguments();
arguments= new ICPPEvaluation[args.length];
for (int i = 0; i < arguments.length; i++) {
- arguments[i] = ((ICPPEvaluationOwner) args[i]).getEvaluation();
+ arguments[i] = ((ICPPASTInitializerClause) args[i]).getEvaluation();
}
}
fEvaluation = EvalTypeId.createForNewExpression(t, this, false, arguments);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java
index c1095de0c7..edf8335b47 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java
@@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTImplicitDestructorName;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTPackExpansionExpression;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
@@ -25,7 +26,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalParameterPack;
/**
* Implementation of pack expansion expression.
*/
-public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPackExpansionExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPackExpansionExpression, IASTAmbiguityParent {
private IASTExpression fPattern;
private ICPPEvaluation fEvaluation;
@@ -63,7 +64,7 @@ public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPac
@Override
public ICPPEvaluation getEvaluation() {
if (fEvaluation == null) {
- fEvaluation = new EvalParameterPack(((ICPPEvaluationOwner) fPattern).getEvaluation(), this);
+ fEvaluation = new EvalParameterPack(((ICPPASTExpression) fPattern).getEvaluation(), this);
}
return fEvaluation;
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java
index d54c1f8730..f4b2277b87 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java
@@ -22,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
-public class CPPASTProblemExpression extends CPPASTProblemOwner implements IASTProblemExpression, ICPPASTExpression, ICPPEvaluationOwner {
+public class CPPASTProblemExpression extends CPPASTProblemOwner implements IASTProblemExpression, ICPPASTExpression {
public CPPASTProblemExpression() {
super();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java
index 9418d81f85..d1dce4ce5e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java
@@ -26,6 +26,7 @@ import org.eclipse.cdt.core.dom.ast.IArrayType;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTRangeBasedForStatement;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
@@ -239,7 +240,7 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
@Override
public ICPPExecution getExecution() {
ExecSimpleDeclaration declarationExec = (ExecSimpleDeclaration)((ICPPExecutionOwner) fDeclaration).getExecution();
- ICPPEvaluation initClauseEval = ((ICPPEvaluationOwner) fInitClause).getEvaluation();
+ ICPPEvaluation initClauseEval = ((ICPPASTInitializerClause) fInitClause).getEvaluation();
ICPPExecution bodyExec = EvalUtil.getExecutionFromStatement(fBody);
IASTImplicitName[] implicitNames = getImplicitNames();
ICPPFunction begin = null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java
index fd06aa6dfb..525c597799 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java
@@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecIncomplete;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecReturn;
@@ -106,8 +107,8 @@ public class CPPASTReturnStatement extends CPPASTAttributeOwner implements IASTR
@Override
public ICPPExecution getExecution() {
- if (retValue instanceof ICPPEvaluationOwner) {
- ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) retValue;
+ if (retValue instanceof ICPPASTInitializerClause) {
+ ICPPASTInitializerClause evalOwner = (ICPPASTInitializerClause) retValue;
return new ExecReturn(evalOwner.getEvaluation());
}
return ExecIncomplete.INSTANCE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java
index cf5f755e0e..45294a31c4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java
@@ -34,7 +34,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalTypeId;
public class CPPASTSimpleTypeConstructorExpression extends ASTNode
- implements ICPPASTSimpleTypeConstructorExpression, IASTImplicitNameOwner, ICPPEvaluationOwner {
+ implements ICPPASTSimpleTypeConstructorExpression, IASTImplicitNameOwner {
private ICPPASTDeclSpecifier fDeclSpec;
private IASTInitializer fInitializer;
private ICPPEvaluation fEvaluation;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java
index a2b8e3ba1a..e331ab2b6b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java
@@ -19,6 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSwitchStatement;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUtil;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecSimpleDeclaration;
@@ -161,7 +162,7 @@ public class CPPASTSwitchStatement extends CPPASTAttributeOwner implements ICPPA
@Override
public ICPPExecution getExecution() {
- ICPPEvaluationOwner controllerExpr = (ICPPEvaluationOwner) getControllerExpression();
+ ICPPASTExpression controllerExpr = (ICPPASTExpression) getControllerExpression();
ICPPExecutionOwner controllerDecl = (ICPPExecutionOwner) getControllerDeclaration();
ICPPEvaluation controllerExprEval = controllerExpr != null ? controllerExpr.getEvaluation() : null;
ExecSimpleDeclaration controllerDeclExec = controllerDecl != null ? (ExecSimpleDeclaration) controllerDecl.getExecution() : null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java
index cac64d46d4..2804c76442 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java
@@ -24,7 +24,7 @@ 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.EvalUnaryTypeID;
-public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpression, ICPPEvaluationOwner {
+public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpression {
private int fOperator;
private IASTTypeId fTypeId;
private ICPPEvaluation fEvaluation;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java
index 4bbc7555ec..9260028b71 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java
@@ -32,7 +32,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalTypeId;
* Type id initializer expression for C++, type-id { initializer }
*/
public class CPPASTTypeIdInitializerExpression extends ASTNode
- implements IASTTypeIdInitializerExpression, ICPPASTExpression, ICPPEvaluationOwner {
+ implements IASTTypeIdInitializerExpression, ICPPASTExpression {
private IASTTypeId fTypeId;
private IASTInitializer fInitializer;
private ICPPEvaluation fEvaluation;
@@ -146,7 +146,7 @@ public class CPPASTTypeIdInitializerExpression extends ASTNode
if (type == null || type instanceof IProblemType)
return EvalFixed.INCOMPLETE;
- return new EvalTypeId(type, this, false, ((ICPPEvaluationOwner) initializer).getEvaluation());
+ return new EvalTypeId(type, this, false, ((ICPPASTInitializerClause) initializer).getEvaluation());
}
@Override
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 046d7643d6..4c3f1ac30b 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
@@ -41,7 +41,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.FunctionSetType;
/**
* Unary expression in c++
*/
-public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
+public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpression, IASTAmbiguityParent {
private int fOperator;
private ICPPASTExpression fOperand;
private ICPPEvaluation fEvaluation;
@@ -196,7 +196,7 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
if (fOperand == null)
return EvalFixed.INCOMPLETE;
- final ICPPEvaluation nestedEval = ((ICPPEvaluationOwner) fOperand).getEvaluation();
+ final ICPPEvaluation nestedEval = fOperand.getEvaluation();
if (fOperator == op_bracketedPrimary)
return nestedEval;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java
index d889455b9b..8e02357028 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java
@@ -18,6 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTWhileStatement;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUtil;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecSimpleDeclaration;
@@ -158,7 +159,7 @@ public class CPPASTWhileStatement extends CPPASTAttributeOwner implements ICPPAS
@Override
public ICPPExecution getExecution() {
- ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getCondition();
+ ICPPASTExpression conditionExpr = (ICPPASTExpression) getCondition();
ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner) getConditionDeclaration();
ICPPEvaluation conditionExprEval = conditionExpr != null ? conditionExpr.getEvaluation() : null;
ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration) conditionDecl.getExecution() : null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java
index 158bb54d1d..551b3cf570 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java
@@ -22,6 +22,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorInitializer;
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.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerList;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
@@ -45,8 +46,8 @@ public class CPPConstructor extends CPPMethod implements ICPPConstructor {
private static ICPPEvaluation getMemberEvaluation(ICPPField member, ICPPASTConstructorChainInitializer chainInitializer, IASTNode point) {
final IASTInitializer initializer = chainInitializer.getInitializer();
- if (initializer instanceof ICPPEvaluationOwner) {
- return ((ICPPEvaluationOwner) initializer).getEvaluation();
+ if (initializer instanceof ICPPASTInitializerClause) {
+ return ((ICPPASTInitializerClause) initializer).getEvaluation();
} else if (initializer instanceof ICPPASTConstructorInitializer) {
IBinding constructor = CPPSemantics.findImplicitlyCalledConstructor(chainInitializer);
if (constructor == null) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java
index 8cfeb85057..f0b2fc9bf7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java
@@ -35,6 +35,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.IValue;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorInitializer;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerList;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBlockScope;
@@ -301,14 +302,13 @@ public class CPPVariable extends PlatformObject implements ICPPInternalVariable
return new EvalConstructor(getType(), constructor, arguments, declarator);
} else if (initializer instanceof IASTEqualsInitializer) {
IASTEqualsInitializer equalsInitializer = (IASTEqualsInitializer) initializer;
- ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) equalsInitializer.getInitializerClause();
- return evalOwner.getEvaluation();
+ ICPPASTInitializerClause clause = (ICPPASTInitializerClause) equalsInitializer.getInitializerClause();
+ return clause.getEvaluation();
} else if (initializer instanceof ICPPASTInitializerList) {
- ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) initializer;
- return evalOwner.getEvaluation();
+ return ((ICPPASTInitializerClause) initializer).getEvaluation();
} else if (initializer instanceof ICPPASTConstructorInitializer) {
ICPPASTConstructorInitializer ctorInitializer = (ICPPASTConstructorInitializer) initializer;
- ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) ctorInitializer.getArguments()[0];
+ ICPPASTInitializerClause evalOwner = (ICPPASTInitializerClause) ctorInitializer.getArguments()[0];
return evalOwner.getEvaluation();
} else if (initializer == null) {
return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java
deleted file mode 100644
index 159090ab29..0000000000
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik
-* Rapperswil, University of applied sciences and others
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*******************************************************************************/
-package org.eclipse.cdt.internal.core.dom.parser.cpp;
-
-public interface ICPPEvaluationOwner {
- /**
- * Returns the evaluation object for this expression.
- */
- ICPPEvaluation getEvaluation();
-}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
index 6ed4003bd3..8f9ffa5a62 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
@@ -118,6 +118,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTForStatement;
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.ICPPASTIfStatement;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerList;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLambdaExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLinkageSpecification;
@@ -229,7 +230,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPASTInternalScope;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPClassSpecializationScope;
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.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalNamespaceScope;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding;
@@ -1279,7 +1279,7 @@ public class CPPSemantics {
if (expression instanceof ICPPASTLiteralExpression) {
final ICPPASTLiteralExpression litExpr = (ICPPASTLiteralExpression) expression;
if (litExpr.getKind() == IASTLiteralExpression.lk_this) {
- final IType thisType = SemanticUtil.getNestedType(((ICPPEvaluationOwner) litExpr).getEvaluation().getType(litExpr), TDEF | ALLCVQ | PTR | ARRAY | MPTR | REF);
+ final IType thisType = SemanticUtil.getNestedType(litExpr.getEvaluation().getType(litExpr), TDEF | ALLCVQ | PTR | ARRAY | MPTR | REF);
if (thisType instanceof ICPPUnknownBinding || thisType instanceof ICPPTemplateDefinition) {
result[0]= true;
return PROCESS_ABORT;
@@ -3151,7 +3151,7 @@ public class CPPSemantics {
// If we're in a dependent context, we don't have enough information
// to resolve the function set.
- if (((ICPPEvaluationOwner) parent).getEvaluation().isTypeDependent()) {
+ if (((ICPPASTExpression) parent).getEvaluation().isTypeDependent()) {
return CPPDeferredFunction.createForCandidates(functionSet.getBindings());
}
}
@@ -3405,7 +3405,7 @@ public class CPPSemantics {
public static ICPPFunction findOverloadedOperator(ICPPASTNewExpression expr) {
OverloadableOperator op = OverloadableOperator.fromNewExpression(expr);
- final ICPPEvaluation evaluation = ((ICPPEvaluationOwner) expr).getEvaluation();
+ final ICPPEvaluation evaluation = expr.getEvaluation();
if (evaluation.isTypeDependent())
return null;
@@ -3422,8 +3422,7 @@ public class CPPSemantics {
args[1]= arg2;
int i= 2;
for (IASTInitializerClause p : placement) {
- final ICPPEvaluationOwner arg = (ICPPEvaluationOwner) p;
- final ICPPEvaluation a = arg.getEvaluation();
+ final ICPPEvaluation a = ((ICPPASTInitializerClause) p).getEvaluation();
if (a.isTypeDependent())
return null;
args[i++]= a;
@@ -3441,7 +3440,7 @@ public class CPPSemantics {
ICPPEvaluation[] args = {
new EvalFixed(type, LVALUE, IntegralValue.UNKNOWN),
- ((ICPPEvaluationOwner) expr.getOperand()).getEvaluation()
+ ((ICPPASTExpression) expr.getOperand()).getEvaluation()
};
return findOverloadedOperator(expr, null, args, type, op, LookupMode.GLOBALS_IF_NO_MEMBERS);
}
@@ -3524,7 +3523,7 @@ public class CPPSemantics {
if (initializer instanceof IASTEqualsInitializer) {
// Copy initialization.
IASTEqualsInitializer eqInit= (IASTEqualsInitializer) initializer;
- ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) eqInit.getInitializerClause();
+ ICPPASTInitializerClause evalOwner = (ICPPASTInitializerClause) eqInit.getInitializerClause();
final ICPPEvaluation evaluation = evalOwner.getEvaluation();
IType sourceType= evaluation.getType(typeId);
ValueCategory isLValue= evaluation.getValueCategory(typeId);
@@ -3544,7 +3543,7 @@ public class CPPSemantics {
}
} else if (initializer instanceof ICPPASTInitializerList) {
// List initialization.
- ICPPEvaluation eval= ((ICPPEvaluationOwner) initializer).getEvaluation();
+ ICPPEvaluation eval= ((ICPPASTInitializerClause) initializer).getEvaluation();
if (eval instanceof EvalInitList) {
Cost c= Conversions.listInitializationSequence((EvalInitList) eval, type, UDCMode.ALLOWED, true, typeId);
if (c.converts()) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java
index 79e4d7e5c6..a4b69997de 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java
@@ -183,7 +183,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPASTInternalTemplateDecla
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPComputableFunction;
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.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInstanceCache;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
@@ -2206,7 +2205,7 @@ public class CPPTemplates {
result[i]= new CPPTemplateTypeArgument(CPPVisitor.createType((IASTTypeId) arg));
} else if (arg instanceof ICPPASTExpression) {
ICPPASTExpression expr= (ICPPASTExpression) arg;
- result[i]= new CPPTemplateNonTypeArgument(((ICPPEvaluationOwner) expr).getEvaluation(), expr);
+ result[i]= new CPPTemplateNonTypeArgument(expr.getEvaluation(), expr);
} else if (arg instanceof ICPPASTAmbiguousTemplateArgument) {
IProblemBinding problem = new ProblemBinding(id, IProblemBinding.SEMANTIC_INVALID_TEMPLATE_ARGUMENTS);
throw new DOMException(problem);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java
index e8ad1a55ed..0963ca0727 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java
@@ -110,6 +110,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTElaboratedTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTEnumerationSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExplicitTemplateInstantiation;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFieldDesignator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFieldReference;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
@@ -221,7 +222,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVariable;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVariableTemplate;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownType;
@@ -1993,7 +1993,7 @@ public class CPPVisitor extends ASTQueries {
IASTInitializerClause[] clauses = ((IASTInitializerList) clause).getClauses();
sizeValue = IntegralValue.create(clauses.length);
} else if (clause instanceof ICPPASTLiteralExpression) {
- ICPPEvaluation value = ((ICPPEvaluationOwner) clause).getEvaluation();
+ ICPPEvaluation value = ((ICPPASTExpression) clause).getEvaluation();
IType valueType = value.getType(clause);
if (valueType instanceof IArrayType) {
sizeValue = ((IArrayType) valueType).getSize();
@@ -2198,7 +2198,7 @@ public class CPPVisitor extends ASTQueries {
}
}
type = decorateType(type, declSpec, declarator);
- final ICPPEvaluation evaluation = ((ICPPEvaluationOwner) initClause).getEvaluation();
+ final ICPPEvaluation evaluation = initClause.getEvaluation();
initType= evaluation.getType(declarator);
valueCat= evaluation.getValueCategory(declarator);
if (initType == null || initType instanceof ISemanticProblem) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java
index c0a9f58fc9..c74ea12b55 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java
@@ -26,6 +26,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.IValue;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorInitializer;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerList;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
@@ -43,7 +44,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredFunction;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVariable;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution;
import org.eclipse.cdt.internal.core.dom.parser.cpp.InstantiationContext;
import org.eclipse.core.runtime.CoreException;
@@ -259,7 +259,7 @@ public final class EvalConstructor extends CPPDependentEvaluation {
private static ICPPEvaluation[] evaluateArguments(IASTInitializerClause... clauses) {
ICPPEvaluation[] args = new ICPPEvaluation[clauses.length];
for (int i = 0; i < clauses.length; i++) {
- ICPPEvaluationOwner clause = (ICPPEvaluationOwner) clauses[i];
+ ICPPASTInitializerClause clause = (ICPPASTInitializerClause) clauses[i];
args[i] = clause.getEvaluation();
}
return args;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java
index 14d13a2be0..8b7ebf0ad0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java
@@ -55,6 +55,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExplicitTemplateInstantiation;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFieldDesignator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFieldReference;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTInitializerClause;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNameSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
@@ -75,7 +76,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPCompositeBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner;
/**
* Context data for IASTName lookup
@@ -524,7 +524,7 @@ public class LookupData extends ScopeLookupData {
public void setFunctionArguments(boolean containsImpliedObject, IASTInitializerClause... exprs) {
ICPPEvaluation[] evals= new ICPPEvaluation[exprs.length];
for (int i = 0; i < evals.length; i++) {
- evals[i]= ((ICPPEvaluationOwner) exprs[i]).getEvaluation();
+ evals[i]= ((ICPPASTInitializerClause) exprs[i]).getEvaluation();
}
setFunctionArguments(containsImpliedObject, evals);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java
index a52234c011..35bf8854a0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java
@@ -84,7 +84,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPQualifierType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateTypeArgument;
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.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.OverloadableOperator;
import org.eclipse.cdt.internal.core.index.IIndexScope;
@@ -874,7 +873,7 @@ public class SemanticUtil {
clause= list.getClauses()[0];
break;
default:
- return ((ICPPEvaluationOwner) init).getEvaluation().getValue(init);
+ return ((ICPPASTInitializerList) init).getEvaluation().getValue(init);
}
}
@@ -883,7 +882,7 @@ public class SemanticUtil {
}
if (clause instanceof ICPPASTInitializerList) {
- return ((ICPPEvaluationOwner) clause).getEvaluation().getValue(clause);
+ return ((ICPPASTInitializerList) clause).getEvaluation().getValue(clause);
}
return IntegralValue.UNKNOWN;
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
index 92e9829b44..e702bbb9ba 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
@@ -37,7 +37,6 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
import org.eclipse.cdt.internal.qt.core.index.IQMethod;
@@ -142,7 +141,7 @@ public class ASTUtil {
return null;
ICPPASTInitializerClause cppInit = (ICPPASTInitializerClause) init;
- ICPPEvaluation eval = ((ICPPEvaluationOwner)cppInit).getEvaluation();
+ ICPPEvaluation eval = cppInit.getEvaluation();
return eval == null ? null : getBaseType(eval.getType(cppInit));
}

Back to the top