aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman.
================ Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:38-40 @@ -34,2 +37,5 @@ SourceLocation ElseLoc = If->getElseLoc(); - DiagnosticBuilder Diag = diag(ElseLoc, "don't use else after return"); + StringRef DiagMessage = "do not use 'else' or 'else if' after something that " + "interrupts control flow - like return, break, " + "throw, continue, goto, etc"; + DiagnosticBuilder Diag = diag(ElseLoc, DiagMessage); ---------------- I think it might be better to specifically identify the flow control construct used instead of a laundry list of possibilities. Then it can be "do not use '%select{else|else if}0' after '%1'". https://reviews.llvm.org/D23265 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits