diff --git a/core/org.eclipse.cdt.core/search/ChangeLog b/core/org.eclipse.cdt.core/search/ChangeLog index 403f93c637b..ceba85da5e8 100644 --- a/core/org.eclipse.cdt.core/search/ChangeLog +++ b/core/org.eclipse.cdt.core/search/ChangeLog @@ -1,6 +1,7 @@ 2003-07-25 Bogdan Gheorghe - Added refs to PathCollector - Filled in feedIndexRequestor for the new search patterns + - Fixed the FunctionDeclarationPattern to work with no parms 2003-07-24 Andrew Niefer - Implemented decodeIndexEntry & matchIndexEntry for all patterns diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java index ef8ad6c649c..d5c6313808f 100644 --- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java @@ -67,10 +67,12 @@ public class FunctionDeclarationPattern extends CSearchPattern { return IMPOSSIBLE_MATCH; } - if( parameterNames != null && parameterNames.length > 0 ){ + if( parameterNames != null && + parameterNames.length > 0 && + parameterNames[0].length > 0 + ){ Iterator params = function.getParameters(); - for( int i = 0; i < parameterNames.length; i++ ){ //if this function doesn't have this many parameters, it is not a match.