-
Committer:
zinovy.nis
-
Date:
2018-05-22 17:24:28 UTC
-
Revision ID:
svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:clang-tools-extra/trunk:333003
[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