1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

Patch for Devin Steffler.

Fixed 84749 - [Parser2] C++ :  isConst not set on function declarator
This commit is contained in:
John Camelon 2005-02-16 18:29:05 +00:00
parent beb6ead6ac
commit 0797607903
2 changed files with 4 additions and 6 deletions

View file

@ -1339,11 +1339,9 @@ public class AST2CPPTests extends AST2BaseTest {
.getExpression();
type = CPPVisitor.getExpressionType(ue);
//when 84749 is fixed, remove this assert and uncomment below.
assertSame(type, A);
// assertTrue( type instanceof IQualifierType );
// assertSame( ((IQualifierType) type).getType(), A );
// assertTrue( ((IQualifierType) type).isConst() );
assertTrue( type instanceof IQualifierType );
assertSame( ((IQualifierType) type).getType(), A );
assertTrue( ((IQualifierType) type).isConst() );
}
public void testBug84710() throws Exception {

View file

@ -3705,7 +3705,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
isPureVirtual = true;
}
}
if (afterCVModifier != LA(1) || LT(1) == IToken.tSEMI) {
if (afterCVModifier != LA(1) || LT(1) == IToken.tSEMI || LT(1) == IToken.tLBRACE) {
// There were C++-specific clauses after
// const/volatile modifier
// Then it is a marker for the method