@Override protected int rwInUnaryExpression(IASTNode node, IASTUnaryExpression expr, int indirection) { switch (expr.getOperator()) { case ICPPASTUnaryExpression.op_typeid: return 0; } return super.rwInUnaryExpression(node, expr, indirection); }
private IASTUnaryExpression findTrailingBracketedPrimaryExpression(IASTExpression expr) { while (true) { if (expr instanceof IASTBinaryExpression) { expr = ((IASTBinaryExpression) expr).getOperand2(); } else if (expr instanceof IASTCastExpression) { expr = ((IASTCastExpression) expr).getOperand(); } else if (expr instanceof IASTUnaryExpression) { IASTUnaryExpression u = (IASTUnaryExpression) expr; if (u.getOperator() == IASTUnaryExpression.op_bracketedPrimary) return u; expr = u.getOperand(); } else { return null; } } }