Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Infinite loop problem

Hi guys, I am having a strange behavior with CDT. The method getExpressionType, in, is entering into an infinite loop for some complex expressions.

To see this behavior, you can use PHP project, more precisely this file: and put this line inside the getExpressionType method: System.out.println( this.getRawSignature() );

This is my visitor:
public class DemoVisitor extends ASTVisitor {
    public Demo() {
        shouldVisitExpressions = true;

    public int visit( IASTExpression _expression_ ) {
         System.out.println( _expression_.getExpressionType() ); // Prints the type of an _expression_
        return PROCESS_CONTINUE;

ps.: I think this problem may be related to C/C++ macro expansions, because it only happens when we try to parse complex macro "expressions". Has anyone ever had a similar problem?

Back to the top