Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Vogt2018-10-28 14:56:04 -0400
committerNathan Ridge2018-10-29 00:06:15 -0400
commit8404a76e6eb4f428eab1db8509a885ba50a1a29c (patch)
treee1d69e059459a472af49e25182e69b0eaecf0866 /core/org.eclipse.cdt.core/parser/org
parent1cbe7e32b9098c2ecacb80db0c6e1b7a43ab2a9b (diff)
downloadorg.eclipse.cdt-8404a76e6eb4f428eab1db8509a885ba50a1a29c.tar.gz
org.eclipse.cdt-8404a76e6eb4f428eab1db8509a885ba50a1a29c.tar.xz
org.eclipse.cdt-8404a76e6eb4f428eab1db8509a885ba50a1a29c.zip
Bug 540538 - Pack size for CPPTemplateParameter
Change-Id: Ie67f27711ca658e9b4b3526c5c3c28541dcd3a15 Signed-off-by: Hannes Vogt <hannes@havogt.de>
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java
index 4e1f201b7b..227118f5cf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java
@@ -50,6 +50,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap;
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
import org.eclipse.cdt.internal.core.dom.parser.DependentValue;
@@ -481,7 +482,10 @@ public class EvalID extends CPPDependentEvaluation {
@Override
public int determinePackSize(ICPPTemplateParameterMap tpMap) {
int r = fFieldOwner != null ? fFieldOwner.determinePackSize(tpMap) : CPPTemplates.PACK_SIZE_NOT_FOUND;
- if (fNameOwner instanceof ICPPUnknownBinding) {
+ if (fNameOwner instanceof ICPPTemplateParameter) {
+ r = CPPTemplates.combinePackSize(r, CPPTemplates.determinePackSize((ICPPTemplateParameter) fNameOwner, tpMap));
+ }
+ else if (fNameOwner instanceof ICPPUnknownBinding) {
r = CPPTemplates.combinePackSize(r, CPPTemplates.determinePackSize((ICPPUnknownBinding) fNameOwner, tpMap));
}
if (fTemplateArgs != null) {

Back to the top