diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecFailingTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecFailingTest.java index b5af225df91..5bc52cf4bb8 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecFailingTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecFailingTest.java @@ -33,32 +33,7 @@ public class AST2CPPSpecFailingTest extends AST2SpecBaseTest { } public void testDummy() {} // avoids JUnit "no tests" warning - - // struct B { - // virtual void f(int); - // virtual void f(char); - // void g(int); - // void h(int); - // }; - // struct D : B { - // using B::f; - // void f(int); // OK: D::f(int) overrides B::f(int); - // using B::g; - // void g(char); // OK - // using B::h; - // void h(int); // OK: D::h(int) hides B::h(int) - // }; - // void k(D* p) - // { - // p->f(1); //calls D::f(int) - // p->f('a'); //calls B::f(char) - // p->g(1); //calls B::g(int) - // p->g('a'); //calls D::g(char) - // } - public void _test7_3_3s12() throws Exception { // raised bug 161562 for that - parse(getAboveComment(), ParserLanguage.CPP, true, 0); - } - + // template struct B { }; // template struct D : public B {}; // struct D2 : public B {}; diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java index b581fcdb563..371603af86d 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java @@ -1479,6 +1479,31 @@ public class AST2CPPSpecTest extends AST2SpecBaseTest { parse(getAboveComment(), ParserLanguage.CPP, true, 0); } + // struct B { + // virtual void f(int); + // virtual void f(char); + // void g(int); + // void h(int); + // }; + // struct D : B { + // using B::f; + // void f(int); // OK: D::f(int) overrides B::f(int); + // using B::g; + // void g(char); // OK + // using B::h; + // void h(int); // OK: D::h(int) hides B::h(int) + // }; + // void k(D* p) + // { + // p->f(1); //calls D::f(int) + // p->f('a'); //calls B::f(char) + // p->g(1); //calls B::g(int) + // p->g('a'); //calls D::g(char) + // } + public void test7_3_3s12() throws Exception { // raised bug 161562 for that + parse(getAboveComment(), ParserLanguage.CPP, true, 0); + } + // namespace A { // int x; // } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java index 52501985896..5c75108467f 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java @@ -7116,7 +7116,7 @@ public class AST2CPPTests extends AST2BaseTest { // using ns::A; // struct A; // A a; - public void _testForwardDeclarationAfterUsing_271236() throws Exception { + public void testForwardDeclarationAfterUsing_271236() throws Exception { BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true); ba.assertNonProblem("A a;", 1, ICPPClassType.class); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java index 74eec0910c3..10c5dda7c29 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java @@ -178,7 +178,7 @@ abstract public class CPPScope implements ICPPScope, ICPPASTInternalScope { } public IBinding getBindingInAST(IASTName name, boolean forceResolve) throws DOMException { - IBinding[] bs= getBindingsInAST(name, forceResolve, false, false, false); + IBinding[] bs= getBindingsInAST(name, forceResolve, false, false, true); return CPPSemantics.resolveAmbiguities(name, bs); }