Skip to content
Commit 9bfe932c authored by Zinovy Nis's avatar Zinovy Nis
Browse files

[clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

bool foo(A &S) {
  if (S != (A)S)
    return false;
  return true;
}
is fixed into (w/o this patch)

...
return !S != (A)S; // negotiation affects first operand only
}
instead of (with this patch)

...
return S == (A)S; // note == instead of !=
}

Differential Revision: https://reviews.llvm.org/D47122

llvm-svn: 333003
parent 65a91288
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment