mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
CORE
Fixed bug39348 - sizeof elaborated types fail in parsing expression TESTS Added DOMFailedTest::testBug39349(). Added DOMTests::testBug39348().
This commit is contained in:
parent
6a7293f951
commit
87e8a2b4d3
5 changed files with 23 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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 };" );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)];");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue