summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2013-01-16 05:00:37 (EST)
committer Sergey Prigogin2013-01-29 19:44:37 (EST)
commit338dc4173df8e04d8a67dc49334431a1bd688020 (patch)
tree44218648890898e113957b0c1054dfff9f944a94
parent19a8e4d063d91fec7b7520b97def65b6f7ac2310 (diff)
downloadorg.eclipse.cdt-338dc4173df8e04d8a67dc49334431a1bd688020.zip
org.eclipse.cdt-338dc4173df8e04d8a67dc49334431a1bd688020.tar.gz
org.eclipse.cdt-338dc4173df8e04d8a67dc49334431a1bd688020.tar.bz2
Reuse CPPTemplates.isValidArgument() is TemplateArgumentDeduction
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);
}
}
}