mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed Bug 79540 [Parser] Macros in class declaration
Committed test case.
This commit is contained in:
parent
2586ae45c5
commit
9faa7fee14
1 changed files with 11 additions and 1 deletions
|
@ -101,6 +101,16 @@ import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class AST2CPPTests extends AST2BaseTest {
|
public class AST2CPPTests extends AST2BaseTest {
|
||||||
|
public void testBug79540() throws Exception {
|
||||||
|
StringBuffer buffer = new StringBuffer( "#define REF_WRAP(e) class A { public: A (){ } A& foo2(e& v) { return *this; } }\n" ); //$NON-NLS-1$
|
||||||
|
buffer.append( "class B\n" ); //$NON-NLS-1$
|
||||||
|
buffer.append( "{\n" ); //$NON-NLS-1$
|
||||||
|
buffer.append( "REF_WRAP(B);\n" ); //$NON-NLS-1$
|
||||||
|
buffer.append( "B();\n" ); //$NON-NLS-1$
|
||||||
|
buffer.append( "void foo();\n" ); //$NON-NLS-1$
|
||||||
|
buffer.append( "};\n" ); //$NON-NLS-1$
|
||||||
|
parseAndCheckBindings( buffer.toString() );
|
||||||
|
}
|
||||||
|
|
||||||
public void testBug78103() throws Exception {
|
public void testBug78103() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer( "int *p1; int *p2;\n" ); //$NON-NLS-1$
|
StringBuffer buffer = new StringBuffer( "int *p1; int *p2;\n" ); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue