1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 08:46:02 +02:00
Fixed bug39348 - sizeof elaborated types fail in parsing expression
TESTS
	Added DOMFailedTest::testBug39349(). 
	Added DOMTests::testBug39348().
This commit is contained in:
John Camelon 2003-06-26 00:11:32 +00:00
parent 6a7293f951
commit 87e8a2b4d3
5 changed files with 23 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2003-06-25 John Camelon
Added DOMFailedTest::testBug39349().
Added DOMTests::testBug39348().
2003-06-25 John Camelon
Create new interface and support for calculating lineNumber/offset mapping.
Updated IASTClassSpecifier for qualified name query.

View file

@ -23,5 +23,10 @@ public class DOMFailedTest extends BaseDOMTest {
public void testBug36730()throws Exception {
failTest("FUNCTION_MACRO( 1, a )\n int i;");
}
public void testBug39349() throws Exception
{
failTest( "enum foo { foo1 = 0, foo2 = 0xffffffffffffffffULL, foo3 = 0xf0fffffffffffffeULL };" );
}
}

View file

@ -2234,4 +2234,10 @@ public class DOMTests extends BaseDOMTest {
assertNull( ((Declarator)((ParameterDeclaration)clause2.getDeclarations().get(0)).getDeclarators().get(0)).getName() );
assertEquals( ((ParameterDeclaration)clause2.getDeclarations().get(0)).getDeclSpecifier().getType(), DeclSpecifier.t_float );
}
public void testBug39348() throws Exception
{
parse("unsigned char a[sizeof (struct sss)];");
}
}

View file

@ -1,3 +1,6 @@
2003-06-25 John Camelon
Fixed bug39348 - sizeof elaborated types fail in parsing expression
2003-06-25 John Camelon
Create new interface and support for calculating lineNumber/offset mapping.
Updated IASTClassSpecifier for qualified name query.

View file

@ -3707,6 +3707,11 @@ public class Parser implements IParser
consume(IToken.t_typename);
name();
}
else if( LT(1) == IToken.t_struct || LT(1) == IToken.t_class || LT(1) == IToken.t_enum || LT(1) == IToken.t_union )
{
consume();
name();
}
else
throw backtrack;
}