Skip to main content
summaryrefslogtreecommitdiffstats
path: root/qt
diff options
context:
space:
mode:
authorToni Suter2016-09-16 02:01:06 -0400
committerNathan Ridge2016-09-16 03:09:25 -0400
commit25d4502b8030063a089ba4b2f5e54aa87374ade4 (patch)
tree79c2b79c0243c4afa7ce1e7b87d4fe09c451d409 /qt
parent46d0c9633bc35321e8ee475636da00b3874b1a56 (diff)
downloadorg.eclipse.cdt-25d4502b8030063a089ba4b2f5e54aa87374ade4.tar.gz
org.eclipse.cdt-25d4502b8030063a089ba4b2f5e54aa87374ade4.tar.xz
org.eclipse.cdt-25d4502b8030063a089ba4b2f5e54aa87374ade4.zip
Bug 490475. Support the evaluation of C++14 constexpr functions
Change-Id: I05029f26b6d33cbeeab8138a270b38c4018b64b5 Signed-off-by: Toni Suter <tsuter@hsr.ch> Signed-off-by: Silvano Brugnoni <sbrugnon@hsr.ch>
Diffstat (limited to 'qt')
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java3
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QmlTypeRegistration.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java6
4 files changed, 10 insertions, 3 deletions
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 e702bbb9ba..92e9829b44 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,6 +37,7 @@ 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;
@@ -141,7 +142,7 @@ public class ASTUtil {
return null;
ICPPASTInitializerClause cppInit = (ICPPASTInitializerClause) init;
- ICPPEvaluation eval = cppInit.getEvaluation();
+ ICPPEvaluation eval = ((ICPPEvaluationOwner)cppInit).getEvaluation();
return eval == null ? null : getBaseType(eval.getType(cppInit));
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java
index 35f2dd5767..dafa3887fe 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java
@@ -52,7 +52,7 @@ public class QEnum implements IQEnum {
this.name = enumerator.getName();
IValue val = enumerator.getValue();
- this.ordinal = val == null ? null : val.numericalValue();
+ this.ordinal = val == null ? null : val.numberValue().longValue();
}
@Override
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QmlTypeRegistration.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QmlTypeRegistration.java
index cf6b03db0f..3035acad0a 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QmlTypeRegistration.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QmlTypeRegistration.java
@@ -83,7 +83,7 @@ public class QmlTypeRegistration extends ASTDelegatedName implements IQtASTName
return null;
IValue val = args[1].getNonTypeValue();
- return val == null ? null : val.numericalValue();
+ return val == null ? null : val.numberValue().longValue();
}
public String getUri() {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
index 2717ef75f2..097de0081a 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
@@ -18,6 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation;
+import org.eclipse.cdt.internal.core.dom.parser.ISerializableExecution;
import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
@@ -296,4 +297,9 @@ public class QtPDOMLinkage extends PDOMLinkage {
public ISerializableEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException {
throw new CoreException(Activator.error("Qt Linkage does not marshal evaluations")); //$NON-NLS-1$
}
+
+ @Override
+ public ISerializableExecution unmarshalExecution(ITypeMarshalBuffer typeMarhsalBuffer) throws CoreException {
+ throw new CoreException(Activator.error("Qt Linkage does not marshal executions")); //$NON-NLS-1$
+ }
}

Back to the top