1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 06:45:43 +02:00
John Camelon 2004-06-24 16:06:27 +00:00
parent 54ec4b834f
commit 552805bba5
2 changed files with 13 additions and 0 deletions

View file

@ -293,4 +293,15 @@ public class SelectionParseTest extends SelectionParseBaseTest {
int startIndex = code.indexOf( "EColours color"); //$NON-NLS-1$
parse( code, startIndex, startIndex + 8 );
}
public void testBug43021() throws Exception
{
Writer writer = new StringWriter();
writer.write( "extern int johnc(__const char *__restrict __format, ...);\n" ); //$NON-NLS-1$
writer.write( "void m() {johnc(\"HI\");}" ); //$NON-NLS-1$
String code = writer.toString();
int startIndex = code.indexOf( "{johnc") + 1; //$NON-NLS-1$
IASTNode node = parse( code, startIndex, startIndex + 5 );
assertNotNull( node );
}
}

View file

@ -2376,6 +2376,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
symbol.addPtrOperator( new TypeInfo.PtrOp( TypeInfo.PtrOp.t_pointer, true, false ));
else if( pointerOperator == ASTPointerOperator.VOLATILE_POINTER )
symbol.addPtrOperator( new TypeInfo.PtrOp( TypeInfo.PtrOp.t_pointer, false, true));
else if( pointerOperator == ASTPointerOperator.RESTRICT_POINTER )
symbol.addPtrOperator( new TypeInfo.PtrOp( TypeInfo.PtrOp.t_pointer ));
// else
// assert false : pointerOperator;
}