Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2004-05-21 14:16:58 -0400
committerAndrew Niefer2004-05-21 14:16:58 -0400
commit701ada92dfd0ed7dd8468d675f1c215320ce0543 (patch)
tree7b04a98f184c18a44fcee11ac665aaae7841d930
parenta355b2cf1d4a15df62e5b611b581ab9df1b08eba (diff)
downloadorg.eclipse.cdt-701ada92dfd0ed7dd8468d675f1c215320ce0543.tar.gz
org.eclipse.cdt-701ada92dfd0ed7dd8468d675f1c215320ce0543.tar.xz
org.eclipse.cdt-701ada92dfd0ed7dd8468d675f1c215320ce0543.zip
bug 62731
-rw-r--r--core/org.eclipse.cdt.core/search/ChangeLog4
-rw-r--r--core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java16
2 files changed, 10 insertions, 10 deletions
diff --git a/core/org.eclipse.cdt.core/search/ChangeLog b/core/org.eclipse.cdt.core/search/ChangeLog
index df1b5ece016..32c8a098658 100644
--- a/core/org.eclipse.cdt.core/search/ChangeLog
+++ b/core/org.eclipse.cdt.core/search/ChangeLog
@@ -1,3 +1,7 @@
+2004-05-21 Andrew Niefer
+ bug 62731 - [Search] typedefs are appearing as union declarations
+ * search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
+
2004-05-21 Bogdan Gheorghe
bug 63320 - Search does not consider working copies
Added a check to turn off indexer timer thread, if number entered is <= 0
diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
index 65a5abeaa23..7610d64c5eb 100644
--- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
+++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
@@ -73,18 +73,14 @@ public class ClassDeclarationPattern extends CSearchPattern {
}
public int matchLevel( ISourceElementCallbackDelegate node, LimitTo limit ){
- if( searchFor == TYPEDEF ){
- if( !( node instanceof IASTTypedefDeclaration ) )
- return IMPOSSIBLE_MATCH;
- } else if( searchFor == ENUM ){
- if( !( node instanceof IASTEnumerationSpecifier ) )
- return IMPOSSIBLE_MATCH;
- } else if ( !( node instanceof IASTClassSpecifier ) &&
- !( node instanceof IASTElaboratedTypeSpecifier ) &&
- !( node instanceof IASTTypedefDeclaration ) &&
- !( node instanceof IASTEnumerationSpecifier) )
+ if ( !( node instanceof IASTClassSpecifier ) &&
+ !( node instanceof IASTElaboratedTypeSpecifier ) &&
+ !( node instanceof IASTTypedefDeclaration ) &&
+ !( node instanceof IASTEnumerationSpecifier) )
{
return IMPOSSIBLE_MATCH;
+ } else if( searchFor != TYPE && ((searchFor == TYPEDEF) ^ (node instanceof IASTTypedefDeclaration)) ) {
+ return IMPOSSIBLE_MATCH;
}
if( ! canAccept( limit ) )

Back to the top