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  D47122  
[clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type Authored by zinovy.nis on May 20 2018, 2:03 PM. 
Details 
 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 != } 
Diff Detail 
 Event TimelineComment Actions LGTM, with a small nit. 
 
 
 
 
 | ||||||||||||||||||||||||||||||||||
E->IgnoreImplicit() can be used to ignore ExprWithCleanups