[PATCH] D16259: Add clang-tidy readability-redundant-control-flow check

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 3 13:38:52 PST 2016


On Wed, Feb 3, 2016 at 3:57 PM, Kim Gräsman <kim.grasman at gmail.com> wrote:
> On Mon, Feb 1, 2016 at 4:32 PM, Aaron Ballman <aaron.ballman at gmail.com> wrote:
>>
>> ================
>> Comment at: clang-tidy/readability/RedundantControlFlowCheck.cpp:60
>> @@ +59,3 @@
>> +  if (const auto *Return = dyn_cast<ReturnStmt>(*last))
>> +    issueDiagnostic(Result, Block, Return->getSourceRange(),
>> +                    RedundantReturnDiag);
>> ----------------
>> It is the LLVM coding style (though I don't personally care for it), and you are right -- a clang-tidy check in the LLVM module wouldn't be amiss. :-)
>
> Isn't this: http://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html?

Yes, that seems to be it. Probably could have an alias in the LLVM
umbrella that points here.

~Aaron


More information about the cfe-commits mailing list