njames93 added a comment. This small fix is definitely worth while, the more involved patch may not ever land.
================ Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:322 DiagnosticBuilder Diag = diag(ElseLoc, WarningMessage) - << ControlFlowInterruptor; + << ControlFlowInterruptor << SourceRange(ElseLoc); removeElseAndBrackets(Diag, *Result.Context, Else, ElseLoc); ---------------- There are more places where diag is called. Maybe add this to all callsites of diag that then emit fixes, otherwise this may miss a few cases. ================ Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:486 + )cpp"); + TestTU TU = TestTU::withCode(Main.code()); + TU.ClangTidyChecks = "-*,llvm-else-after-return"; ---------------- This needs rebasing, clang tidy interface for checks has changed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92272/new/ https://reviews.llvm.org/D92272 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits