mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +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();
|
final IASTExpression expr= super.conditionalExpression();
|
||||||
if (templateArgListCount > 0) {
|
if (templateArgListCount > 0) {
|
||||||
// bug 104706, don't allow usage of logical operators in template argument lists.
|
// bug 104706, don't allow usage of logical operators in template argument lists.
|
||||||
if (expr instanceof IASTConditionalExpression)
|
if (expr instanceof IASTConditionalExpression) {
|
||||||
|
final ASTNode node = (ASTNode) expr;
|
||||||
if (expr instanceof IASTBinaryExpression) {
|
throwBacktrack(node.getOffset(), node.getLength());
|
||||||
|
}
|
||||||
|
else if (expr instanceof IASTBinaryExpression) {
|
||||||
IASTBinaryExpression bexpr= (IASTBinaryExpression) expr;
|
IASTBinaryExpression bexpr= (IASTBinaryExpression) expr;
|
||||||
switch (bexpr.getOperator()) {
|
switch (bexpr.getOperator()) {
|
||||||
case IASTBinaryExpression.op_logicalAnd:
|
case IASTBinaryExpression.op_logicalAnd:
|
||||||
|
|
Loading…
Add table
Reference in a new issue