mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Test case for bug 263159.
This commit is contained in:
parent
87a19bbe37
commit
8c2f625a89
1 changed files with 16 additions and 5 deletions
|
@ -5928,7 +5928,6 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
|
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// typedef char* t1;
|
// typedef char* t1;
|
||||||
// typedef char t2[8];
|
// typedef char t2[8];
|
||||||
// void test(char * x) {}
|
// void test(char * x) {}
|
||||||
|
@ -5944,7 +5943,6 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
|
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// typedef char t[12];
|
// typedef char t[12];
|
||||||
// void test1(char *);
|
// void test1(char *);
|
||||||
// void test2(char []);
|
// void test2(char []);
|
||||||
|
@ -6620,7 +6618,7 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
|
|
||||||
// struct A {};
|
// struct A {};
|
||||||
//
|
//
|
||||||
// void foo() {
|
// void test() {
|
||||||
// while (
|
// while (
|
||||||
// A* a = 0
|
// A* a = 0
|
||||||
// );
|
// );
|
||||||
|
@ -6630,4 +6628,17 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
ba.assertNonProblem("A*", 1, ICPPClassType.class);
|
ba.assertNonProblem("A*", 1, ICPPClassType.class);
|
||||||
ba.assertNonProblem("a", 1, ICPPVariable.class);
|
ba.assertNonProblem("a", 1, ICPPVariable.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const char x[] = "";
|
||||||
|
//
|
||||||
|
// void f(const char* p);
|
||||||
|
// void f(char p);
|
||||||
|
//
|
||||||
|
// void test() {
|
||||||
|
// f(x); // problem on f
|
||||||
|
// }
|
||||||
|
public void _testArrayParameter_263159() throws Exception {
|
||||||
|
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
|
||||||
|
ba.assertNonProblem("f(x)", 1, ICPPFunction.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue