summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2013-03-09 22:44:23 (EST)
committerSergey Prigogin2013-03-11 14:06:23 (EDT)
commit072b8512ea7ffded0f5feedab57b369f47faa8b4 (patch)
tree15649af50c470a1a39c567d81e3a37fa825b2cd4
parentaed09ee4b8bdf2110254ae1e6e84ebd4a5d8e804 (diff)
downloadorg.eclipse.cdt-072b8512ea7ffded0f5feedab57b369f47faa8b4.zip
org.eclipse.cdt-072b8512ea7ffded0f5feedab57b369f47faa8b4.tar.gz
org.eclipse.cdt-072b8512ea7ffded0f5feedab57b369f47faa8b4.tar.bz2
Bug 402807 - Partial specialization for vararg function typerefs/changes/25/11025/2
Change-Id: I2fa7bdede392a5b51da065d1d6196b10f2a52d6a Reviewed-on: https://git.eclipse.org/r/11025 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.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java13
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java2
2 files changed, 14 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
index 7ec5252..9953690 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
@@ -7195,6 +7195,19 @@ public class AST2TemplateTests extends AST2TestBase {
parseAndCheckBindings();
}
+ // template <typename T>
+ // struct waldo {
+ // typedef int type;
+ // };
+ //
+ // template <typename R>
+ // struct waldo<R (...)>;
+ //
+ // typedef waldo<int ()>::type Type;
+ public void testPartialSpecializationForVarargFunctionType_402807() throws Exception {
+ parseAndCheckBindings();
+ }
+
// template <typename>
// struct meta {
// static const bool value = 1;
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 f034036..6dd0f7b 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
@@ -922,7 +922,7 @@ public class TemplateArgumentDeduction {
private boolean fromFunctionType(ICPPFunctionType ftp, ICPPFunctionType fta, IASTNode point)
throws DOMException {
- if (ftp.isConst() != fta.isConst() || ftp.isVolatile() != fta.isVolatile())
+ if (ftp.isConst() != fta.isConst() || ftp.isVolatile() != fta.isVolatile() || ftp.takesVarArgs() != fta.takesVarArgs())
return false;
if (!fromType(ftp.getReturnType(), fta.getReturnType(), false, point))