mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
This commit is contained in:
parent
05ec4b4f52
commit
78cc9ee282
2 changed files with 13 additions and 0 deletions
|
@ -304,4 +304,14 @@ public class SelectionParseTest extends SelectionParseBaseTest {
|
||||||
IASTNode node = parse( code, startIndex, startIndex + 5 );
|
IASTNode node = parse( code, startIndex, startIndex + 5 );
|
||||||
assertNotNull( node );
|
assertNotNull( node );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testBug68527() throws Exception
|
||||||
|
{
|
||||||
|
Writer writer = new StringWriter();
|
||||||
|
writer.write("struct X;\n"); //$NON-NLS-1$
|
||||||
|
writer.write("struct X anA;"); //$NON-NLS-1$
|
||||||
|
String code = writer.toString();
|
||||||
|
int startIndex = code.indexOf( "X anA"); //$NON-NLS-1$
|
||||||
|
parse( code, startIndex, startIndex + 1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1939,8 +1939,11 @@ public abstract class Parser extends ExpressionParser implements IParser
|
||||||
sdw.setTypeSpecifier(elaboratedTypeSpec);
|
sdw.setTypeSpecifier(elaboratedTypeSpec);
|
||||||
|
|
||||||
if (isForewardDecl)
|
if (isForewardDecl)
|
||||||
|
{
|
||||||
((IASTElaboratedTypeSpecifier) elaboratedTypeSpec).acceptElement(
|
((IASTElaboratedTypeSpecifier) elaboratedTypeSpec).acceptElement(
|
||||||
requestor, astFactory.getReferenceManager());
|
requestor, astFactory.getReferenceManager());
|
||||||
|
handleOffsetableNamedElement((IASTOffsetableNamedElement) elaboratedTypeSpec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Parses the initDeclarator construct of the ANSI C++ spec.
|
* Parses the initDeclarator construct of the ANSI C++ spec.
|
||||||
|
|
Loading…
Add table
Reference in a new issue