mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Patch for Victor Mozgin
Fixed PR 39540 : Parser fails on const qualifier after class specifier
This commit is contained in:
parent
022ba9b789
commit
c2e6e9ec5b
5 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,6 @@
|
|||
2003-07-31 Victor Mozgin
|
||||
Moved testBug39540() from ASTFailedTests.java to QuickParseASTTests.java.
|
||||
|
||||
2003-07-30 Hoda Amer
|
||||
The CModelElementsTests has the pointer to function test back in its original place
|
||||
(a variable)
|
||||
|
|
|
@ -106,10 +106,6 @@ public class ASTFailedTests extends BaseASTTest
|
|||
{
|
||||
assertCodeFailsParse("template C::operator int<float> ();");
|
||||
}
|
||||
public void testBug39540() throws Exception
|
||||
{
|
||||
assertCodeFailsParse("class {} const null;");
|
||||
}
|
||||
public void testBug39542() throws Exception
|
||||
{
|
||||
assertCodeFailsParse("void f(int a, struct {int b[a];} c) {}");
|
||||
|
|
|
@ -1757,4 +1757,10 @@ public class QuickParseASTTests extends BaseASTTest
|
|||
parse("class N1::N2::B : public A {};");
|
||||
assertTrue( quickParseCallback.getCompilationUnit().getDeclarations().hasNext() );
|
||||
}
|
||||
|
||||
public void testBug39540() throws Exception
|
||||
{
|
||||
parse("class {} const null;");
|
||||
assertTrue( quickParseCallback.getCompilationUnit().getDeclarations().hasNext() );
|
||||
}
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
2003-07-31 Victor Mozgin
|
||||
Fixed PR 39540 : Parser fails on const qualifier after class specifier.
|
||||
|
||||
2003-07-30 Victor Mozgin
|
||||
Fixed PR 39532 : Parser fails on fully-qualified class names.
|
||||
|
||||
|
|
|
@ -1359,7 +1359,7 @@ public class Parser implements IParser
|
|||
ITokenDuple duple = new TokenDuple(first, last);
|
||||
sdw.setTypeName(duple);
|
||||
|
||||
return;
|
||||
break;
|
||||
case IToken.tCOLONCOLON :
|
||||
consume(IToken.tCOLONCOLON);
|
||||
// handle nested later:
|
||||
|
@ -1408,7 +1408,8 @@ public class Parser implements IParser
|
|||
try
|
||||
{
|
||||
classSpecifier(sdw);
|
||||
return;
|
||||
flags.setEncounteredTypename(true);
|
||||
break;
|
||||
}
|
||||
catch (Backtrack bt)
|
||||
{
|
||||
|
@ -1429,6 +1430,7 @@ public class Parser implements IParser
|
|||
try
|
||||
{
|
||||
enumSpecifier(sdw);
|
||||
flags.setEncounteredTypename(true);
|
||||
break;
|
||||
}
|
||||
catch (Backtrack bt)
|
||||
|
|
Loading…
Add table
Reference in a new issue