summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2013-01-16 05:00:37 (EST)
committerSergey Prigogin2013-01-29 17:29:36 (EST)
commit0cca070d73e448b31c259cc35edc47931835a00a (patch)
treeb9303011f367f8da0630f122c20518166d364055
parent1c88eba5239c31cdc5ae94a3f11e894227bf0689 (diff)
downloadorg.eclipse.cdt-0cca070d73e448b31c259cc35edc47931835a00a.zip
org.eclipse.cdt-0cca070d73e448b31c259cc35edc47931835a00a.tar.gz
org.eclipse.cdt-0cca070d73e448b31c259cc35edc47931835a00a.tar.bz2
Reuse CPPTemplates.isValidArgument() is TemplateArgumentDeductionrefs/changes/97/9697/2
Change-Id: I85abc02f4fe36719c16fcb52b4c675b9ab46d449 Reviewed-on: https://git.eclipse.org/r/9697 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java
index 4233824..6319e0c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java
@@ -636,16 +636,8 @@ public class TemplateArgumentDeduction {
deducedArg= tpar.getDefaultValue();
if (deducedArg != null) {
deducedArg= CPPTemplates.instantiateArgument(deducedArg, tpMap, -1, null, point);
- if (deducedArg != null) {
- if (deducedArg instanceof CPPTemplateTypeArgument) {
- CPPTemplateTypeArgument deducedTypeArg = (CPPTemplateTypeArgument) deducedArg;
- if (!(deducedTypeArg.getTypeValue() instanceof ISemanticProblem)) {
- tpMap.put(tpar, deducedArg);
- }
- } else {
- // TODO: Check for problems in non-type or template template parameters?
- tpMap.put(tpar, deducedArg);
- }
+ if (CPPTemplates.isValidArgument(deducedArg)) {
+ tpMap.put(tpar, deducedArg);
}
}
}