================
@@ -237,6 +255,8 @@ static StringRef getControlFlowString(const Stmt &Stmt) {
return "break";
if (isa<CXXThrowExpr>(Stmt))
return "throw";
+ if (isNoReturnStmt(Stmt))
+ return "noreturn";
----------------
localspook wrote:
The message
```txt
do not use 'else' after 'noreturn'
```
seems a bit opaque. I would suggest something like
```txt
do not use 'else' after calling a function that doesn't return
```
You'll have to remove the single quotes around `%0` here:
https://github.com/llvm/llvm-project/blob/ae282974b8a40e20a4c55dfffba84d24db843d74/clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp#L51
and move them into `getControlFlowString`.
https://github.com/llvm/llvm-project/pull/185202
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits