Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2018-04-03 00:29:58 +0000
committerNathan Ridge2018-04-13 05:43:26 +0000
commitff1cfbf1d4a01e1487ac8a76ebabee67552384c7 (patch)
treef582e6aa5401dd45179fb947339937c47a2c2e4d
parent47d08ec20444e80ed180e48b29b5c43559e9c26e (diff)
downloadorg.eclipse.cdt-ff1cfbf1d4a01e1487ac8a76ebabee67552384c7.tar.gz
org.eclipse.cdt-ff1cfbf1d4a01e1487ac8a76ebabee67552384c7.tar.xz
org.eclipse.cdt-ff1cfbf1d4a01e1487ac8a76ebabee67552384c7.zip
Bug 532905 - Implement compositing for InitializerListType
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java
index 4aff3b0b19..c3c1c76d3e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java
@@ -108,6 +108,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalReference;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalTypeId;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUnary;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUnaryTypeID;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.InitializerListType;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.TypeOfDependentExpression;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.TypeOfUnknownMember;
import org.eclipse.cdt.internal.core.index.CIndex;
@@ -270,6 +271,13 @@ public class CPPCompositesFactory extends AbstractCompositeFactory {
IType operand = getCompositeType(typeTransformation.getOperand());
return new CPPUnaryTypeTransformation(typeTransformation.getOperator(), operand);
}
+ if (rtype instanceof InitializerListType) {
+ EvalInitList e = ((InitializerListType) rtype).getEvaluation();
+ EvalInitList e2 = (EvalInitList) getCompositeEvaluation(e);
+ if (e2 != e)
+ return new InitializerListType(e2);
+ return rtype;
+ }
if (rtype instanceof IBasicType || rtype == null || rtype instanceof ISemanticProblem) {
return rtype;
}

Back to the top