Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-11 14:41:14 +0000
committerMarkus Schorn2008-04-11 14:41:14 +0000
commit306de145437a1f181ef99a50536c9e6094050cce (patch)
tree3667410f2c22429cb1addc877666b50d1d40d8e1 /core/org.eclipse.cdt.core
parent7aab1dfa1cfebf63ea4c8c3249cdcc81a44496fd (diff)
downloadorg.eclipse.cdt-306de145437a1f181ef99a50536c9e6094050cce.tar.gz
org.eclipse.cdt-306de145437a1f181ef99a50536c9e6094050cce.tar.xz
org.eclipse.cdt-306de145437a1f181ef99a50536c9e6094050cce.zip
Correct parsing of typeof-expressions, bug 226492.
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
index f1a52df2c6..df4c2781ba 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
@@ -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:

Back to the top