mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
org.eclipse.cdt.core: Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=44249 & fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52004 <BR>
org.eclipse.cdt.core.tests: Added CompleteParseASTTest::testBug44249().
This commit is contained in:
parent
c73b30f8ce
commit
f6c0374580
4 changed files with 36 additions and 5 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2004-04-14 John Camelon
|
||||||
|
Added CompleteParseASTTest::testBug44249().
|
||||||
|
|
||||||
2004-04-14 John Camelon
|
2004-04-14 John Camelon
|
||||||
Added CompletionTest::testBug58178().
|
Added CompletionTest::testBug58178().
|
||||||
|
|
||||||
|
|
|
@ -1487,4 +1487,17 @@ public class CompleteParseASTTest extends CompleteParseBaseTest
|
||||||
assertTrue( forewardDecl.isFriendDeclaration() );
|
assertTrue( forewardDecl.isFriendDeclaration() );
|
||||||
assertTrue( f.isFriend() );
|
assertTrue( f.isFriend() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testBug44249() throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
Iterator i = parse( "class SD_01 { public:\n void SD_01::f_SD_01();};" ).getDeclarations();
|
||||||
|
IASTClassSpecifier SD_01 = (IASTClassSpecifier) ((IASTAbstractTypeSpecifierDeclaration)i.next()).getTypeSpecifier();
|
||||||
|
assertFalse( i.hasNext() );
|
||||||
|
i = getDeclarations( SD_01 );
|
||||||
|
IASTMethod f_SD_01 = (IASTMethod) i.next();
|
||||||
|
assertFalse( i.hasNext() );
|
||||||
|
assertEquals( f_SD_01.getName(), "f_SD_01");
|
||||||
|
assertAllReferences( 1, createTaskList( new Task( SD_01 )));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2004-04-14 John Camelon
|
||||||
|
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=44249
|
||||||
|
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=52004
|
||||||
|
|
||||||
2004-04-14 John Camelon
|
2004-04-14 John Camelon
|
||||||
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58500
|
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58500
|
||||||
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58178
|
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58178
|
||||||
|
|
|
@ -2199,14 +2199,25 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
boolean isDestructor = false;
|
boolean isDestructor = false;
|
||||||
|
|
||||||
IContainerSymbol ownerScope = scopeToSymbol( ownerTemplate != null ? (IASTScope) ownerTemplate : scope );
|
IContainerSymbol ownerScope = scopeToSymbol( ownerTemplate != null ? (IASTScope) ownerTemplate : scope );
|
||||||
IParameterizedSymbol symbol = pst.newParameterizedSymbol( nameDuple.toString(), TypeInfo.t_function );
|
|
||||||
|
IParameterizedSymbol symbol = null;
|
||||||
|
|
||||||
|
if( references == null )
|
||||||
|
{
|
||||||
|
references = new ArrayList();
|
||||||
|
if( nameDuple.length() != 1 )
|
||||||
|
{
|
||||||
|
ITokenDuple leadingSegments = nameDuple.getLeadingSegments();
|
||||||
|
ISymbol test = lookupQualifiedName( ownerScope, leadingSegments, references, false );
|
||||||
|
if( test == ownerScope )
|
||||||
|
nameDuple = nameDuple.getLastSegment();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
symbol = pst.newParameterizedSymbol( nameDuple.toString(), TypeInfo.t_function );
|
||||||
setFunctionTypeInfoBits(isInline, isFriend, isStatic, symbol);
|
setFunctionTypeInfoBits(isInline, isFriend, isStatic, symbol);
|
||||||
setMethodTypeInfoBits( symbol, isConst, isVolatile, isVirtual, isExplicit );
|
setMethodTypeInfoBits( symbol, isConst, isVolatile, isVirtual, isExplicit );
|
||||||
symbol.setHasVariableArgs( hasVariableArguments );
|
symbol.setHasVariableArgs( hasVariableArguments );
|
||||||
|
|
||||||
if(references == null)
|
|
||||||
references = new ArrayList();
|
|
||||||
|
|
||||||
if( returnType.getTypeSpecifier() != null )
|
if( returnType.getTypeSpecifier() != null )
|
||||||
setParameter( symbol, returnType, false, references );
|
setParameter( symbol, returnType, false, references );
|
||||||
setParameters( symbol, references, parameters.iterator() );
|
setParameters( symbol, references, parameters.iterator() );
|
||||||
|
|
Loading…
Add table
Reference in a new issue