mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Replaced impossible instanceof check in ASTQueries:
It does not make sense for findTypeRelevantDeclarator to check whether the innermost declarator (result) is of type IASTArrayModifier: - There is no common subtype of IASTDeclarator and IASTArrayModifier. - IASTArrayModifier are attached to IASTArrayDeclarators but they are not resolved as nested declarators. - Similar to the existence of pointer operators, the resolution of the innermost type relevant declarator should stop at array declarators. Change-Id: I9c3673f60a48245eb51ccc8cb94757b87abf0265 Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
This commit is contained in:
parent
7542722436
commit
f2a86c5b5e
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
|||
package org.eclipse.cdt.internal.core.dom.parser;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFieldDeclarator;
|
||||
|
@ -117,7 +117,7 @@ public class ASTQueries {
|
|||
while (result.getPointerOperators().length == 0
|
||||
&& !(result instanceof IASTFieldDeclarator)
|
||||
&& !(result instanceof IASTFunctionDeclarator)
|
||||
&& !(result instanceof IASTArrayModifier)) {
|
||||
&& !(result instanceof IASTArrayDeclarator)) {
|
||||
final IASTNode parent= result.getParent();
|
||||
if (parent instanceof IASTDeclarator) {
|
||||
result= (IASTDeclarator) parent;
|
||||
|
|
Loading…
Add table
Reference in a new issue