summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2013-09-08 00:47:54 (EDT)
committer Sergey Prigogin2013-09-10 12:41:06 (EDT)
commita2a8a1dd8ccb458b38730d9cd3ad53f4744acfc9 (patch)
tree0912261c87e8160c8e2993602e03afaae607c150
parent27f5b2b057758095ae77d461cd9a590d64cda3f8 (diff)
downloadorg.eclipse.cdt-a2a8a1dd8ccb458b38730d9cd3ad53f4744acfc9.zip
org.eclipse.cdt-a2a8a1dd8ccb458b38730d9cd3ad53f4744acfc9.tar.gz
org.eclipse.cdt-a2a8a1dd8ccb458b38730d9cd3ad53f4744acfc9.tar.bz2
Bug 416788 - [regression] "Member declaration not found" for member of
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 f71aa75..fd7bcba 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
@@ -8036,4 +8036,24 @@ public class AST2TemplateTests extends AST2TestBase {
public void testOutOfLineMethodOfPartialSpecialization_401152() throws Exception {
parseAndCheckBindings();
}
+
+ // 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 54c580a..1e21fca 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
@@ -160,7 +160,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
IScope scope= this;
IASTName[] segments= name.getNames();
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();