mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Fixed 271236 and 144542.
This commit is contained in:
parent
962ee7affa
commit
1d92535285
4 changed files with 28 additions and 28 deletions
|
@ -34,31 +34,6 @@ public class AST2CPPSpecFailingTest extends AST2SpecBaseTest {
|
||||||
|
|
||||||
public void testDummy() {} // avoids JUnit "no tests" warning
|
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 <class T> struct B { };
|
// template <class T> struct B { };
|
||||||
// template <class T> struct D : public B<T> {};
|
// template <class T> struct D : public B<T> {};
|
||||||
// struct D2 : public B<int> {};
|
// struct D2 : public B<int> {};
|
||||||
|
|
|
@ -1479,6 +1479,31 @@ public class AST2CPPSpecTest extends AST2SpecBaseTest {
|
||||||
parse(getAboveComment(), ParserLanguage.CPP, true, 0);
|
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 {
|
// namespace A {
|
||||||
// int x;
|
// int x;
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -7116,7 +7116,7 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
// using ns::A;
|
// using ns::A;
|
||||||
// struct A;
|
// struct A;
|
||||||
// A a;
|
// A a;
|
||||||
public void _testForwardDeclarationAfterUsing_271236() throws Exception {
|
public void testForwardDeclarationAfterUsing_271236() throws Exception {
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
|
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
|
||||||
ba.assertNonProblem("A a;", 1, ICPPClassType.class);
|
ba.assertNonProblem("A a;", 1, ICPPClassType.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ abstract public class CPPScope implements ICPPScope, ICPPASTInternalScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBinding getBindingInAST(IASTName name, boolean forceResolve) throws DOMException {
|
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);
|
return CPPSemantics.resolveAmbiguities(name, bs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue