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:
parent
7aab1dfa1c
commit
306de14543
1 changed files with 5 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue