1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Correct parsing of typeof-expressions, bug 226492.

This commit is contained in:
Markus Schorn 2008-04-11 14:41:14 +00:00
parent 7aab1dfa1c
commit 306de14543

View file

@ -417,9 +417,11 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
final IASTExpression expr= super.conditionalExpression();
if (templateArgListCount > 0) {
// bug 104706, don't allow usage of logical operators in template argument lists.
if (expr instanceof IASTConditionalExpression)
if (expr instanceof IASTBinaryExpression) {
if (expr instanceof IASTConditionalExpression) {
final ASTNode node = (ASTNode) expr;
throwBacktrack(node.getOffset(), node.getLength());
}
else if (expr instanceof IASTBinaryExpression) {
IASTBinaryExpression bexpr= (IASTBinaryExpression) expr;
switch (bexpr.getOperator()) {
case IASTBinaryExpression.op_logicalAnd: