Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 f1a52df2c6e..df4c2781ba2 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