mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
This commit is contained in:
parent
54ec4b834f
commit
552805bba5
2 changed files with 13 additions and 0 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue