mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
fix bug 63478
This commit is contained in:
parent
4b1ecbf65b
commit
a4bc1beabc
3 changed files with 23 additions and 1 deletions
|
@ -224,4 +224,14 @@ public class FunctionMethodPatternTests extends BaseSearchTest {
|
|||
matches = resultCollector.getSearchResults();
|
||||
assertEquals( matches.size(), 0 );
|
||||
}
|
||||
|
||||
public void testBug63478(){
|
||||
ICSearchPattern pattern = SearchEngine.createSearchPattern( "A::B::f(*)", METHOD, DECLARATIONS, true );
|
||||
|
||||
search( workspace, pattern, scope, resultCollector );
|
||||
|
||||
Set matches = resultCollector.getSearchResults();
|
||||
|
||||
assertEquals( matches.size(), 4 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
2004-05-21 Andrw Niefer
|
||||
fix bug 63478
|
||||
|
||||
2004-05-21 Andrew Niefer
|
||||
Indexer problems reporting: group problems under the indexer job in progress view
|
||||
|
||||
|
|
|
@ -39,9 +39,11 @@ import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException;
|
|||
import org.eclipse.cdt.core.parser.ast.ASTPointerOperator;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTFunction;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTOffsetableElement;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTSimpleTypeSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier;
|
||||
|
@ -500,7 +502,14 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
|
|||
|
||||
if( declarations == null || ! declarations.hasNext() )
|
||||
return null;
|
||||
IASTFunction function = (IASTFunction) declarations.next();
|
||||
|
||||
IASTDeclaration decl = (IASTDeclaration) declarations.next();
|
||||
if( !(decl instanceof IASTFunction) ){
|
||||
//if the user puts something not so good in the brackets, we might not get a function back
|
||||
return list;
|
||||
}
|
||||
|
||||
IASTFunction function = (IASTFunction) decl;
|
||||
|
||||
Iterator parameters = function.getParameters();
|
||||
char [] param = null;
|
||||
|
|
Loading…
Add table
Reference in a new issue