summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2013-09-08 00:47:54 (EDT)
committerSergey Prigogin2013-09-09 12:53:45 (EDT)
commit6631c857b996d332e9c7a455e327322e0c372c24 (patch)
treea470d1941ecc4bdbfc1d4745003157f745034f83
parent6856d55b68a7b7f82ab1b9e56a7b7462029b748f (diff)
downloadorg.eclipse.cdt-6631c857b996d332e9c7a455e327322e0c372c24.zip
org.eclipse.cdt-6631c857b996d332e9c7a455e327322e0c372c24.tar.gz
org.eclipse.cdt-6631c857b996d332e9c7a455e327322e0c372c24.tar.bz2
Bug 416788 - [regression] "Member declaration not found" for member ofrefs/changes/07/16207/2
template specialization Change-Id: I388ea1f7dc6ff2bf315958960a113e9110acd9c8 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/16207 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.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java2
2 files changed, 21 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 8e258b4..79df6f4 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
@@ -8076,4 +8076,24 @@ public class AST2TemplateTests extends AST2TestBase {
helper.assertNonProblem("decltype(foo(T()))::type");
assertSameType((ITypedef) helper.assertNonProblem("U<S>::type"), CommonTypes.int_);
}
+
+ // namespace N {
+ // template <typename>
+ // struct C;
+ //
+ // template <typename T>
+ // struct C<T*> {
+ // C();
+ // void waldo();
+ // };
+ //
+ // template <typename T>
+ // C<T*>::C() {}
+ //
+ // template <typename T>
+ // void C<T*>::waldo() {}
+ // }
+ public void testMemberOfPartialSpecialization_416788() throws Exception {
+ parseAndCheckBindings();
+ }
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
index c4b2729..205e9de 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
@@ -163,7 +163,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
IScope scope= this;
ICPPASTNameSpecifier[] segments= name.getQualifier();
try {
- for (int i= segments.length - 1; --i >= 0;) {
+ for (int i= segments.length; --i >= 0;) {
if (scope == null)
return false;
IName scopeName = scope.getScopeName();