mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Added a test case for a bogus conversion from a class to const int&.
This commit is contained in:
parent
2e9b63b2c2
commit
83ac816fc2
1 changed files with 14 additions and 1 deletions
|
@ -6610,6 +6610,19 @@ public class AST2CPPTests extends AST2BaseTest {
|
|||
final String code= getAboveComment();
|
||||
parseAndCheckBindings(code);
|
||||
}
|
||||
|
||||
// struct A {};
|
||||
// A a();
|
||||
//
|
||||
// void f(const int& x);
|
||||
//
|
||||
// void test() {
|
||||
// f(a());
|
||||
// }
|
||||
public void _testBug263152_1() throws Exception {
|
||||
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
|
||||
ba.assertProblem("f(a())", 1);
|
||||
}
|
||||
|
||||
// struct A {};
|
||||
// A a();
|
||||
|
@ -6622,7 +6635,7 @@ public class AST2CPPTests extends AST2BaseTest {
|
|||
// void test(B p) {
|
||||
// p.m(a());
|
||||
// }
|
||||
public void _testBug263152() throws Exception {
|
||||
public void _testBug263152_2() throws Exception {
|
||||
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
|
||||
ba.assertNonProblem("m(a())", 1, ICPPMethod.class);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue