Print this page
11506 smatch resync

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/smatch_conditions.c
          +++ new/usr/src/tools/smatch/src/smatch_conditions.c
↓ open down ↓ 412 lines elided ↑ open up ↑
 413  413           * that || implies a memory barrier between conditions.  The easiest way
 414  414           * to handle it is by pretending that | also has a barrier and re-using
 415  415           * all the normal condition code.  This potentially hides some bugs, but
 416  416           * people who write code like this should just be careful or they
 417  417           * deserve bugs.
 418  418           *
 419  419           * We could potentially treat boolean bitwise & this way but that seems
 420  420           * too complicated to deal with.
 421  421           */
 422  422          if (expr->type == EXPR_BINOP && expr->op == '|') {
      423 +                expr_set_parent_expr(expr->left, expr);
      424 +                expr_set_parent_expr(expr->right, expr);
 423  425                  handle_logical(expr);
 424  426                  return;
 425  427          }
 426  428  
 427  429          switch (expr->type) {
 428  430          case EXPR_LOGICAL:
 429  431                  expr_set_parent_expr(expr->left, expr);
 430  432                  expr_set_parent_expr(expr->right, expr);
 431  433                  __pass_to_client(expr, LOGIC_HOOK);
 432  434                  handle_logical(expr);
↓ open down ↓ 320 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX