Simplify boolean expressions using true and false with clang-tidy
Diff Detail
Diff Detail
Event Timeline
Comment Actions
In article <CAENS6EtScu6-nzsJk5V+O8J1LbgBpYtQeu9NtYrMJ-UQ0Kkw1g@mail.gmail.com>,
David Blaikie <dblaikie@gmail.com> writes:
If we changed the code to:
if (x)
return true;return false;
would it still trigger the cleanup check you're using?
Nope.
The tool explicitly looks for 'if (e) return true; else return false;'
and replaces that with 'return e;'