| Issue |
168599
|
| Summary |
[clang-tidy] Add check to flag use of early `return` or `continue`
|
| Labels |
clang-tidy,
check-request
|
| Assignees |
|
| Reporter |
vbvictor
|
Code like this:
```cpp
void foo() {
// some processing
if (cond) {
// a lot of code
}
}
```
can be transformed to:
```cpp
void foo() {
// some processing
if (cond)
return
// a lot of code
}
```
And code like this:
```cpp
while (...) {
if (cond) {
// a lot of code
}
}
```
can be transformed to:
```cpp
while (...) { // could be 'for' too
if (!cond)
continue
// a lot of code
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs