Issue 87146
Summary [clang-tidy] false-positive bugprone-branch-clone when switch case fallthrough with some Side Effects exp
Labels clang-tidy
Assignees
Reporter hstk30-hw
    https://godbolt.org/z/zshW85bME

```
int test1(int a) {
    int b = 0;
    switch (a) {
        case 1: b++; // fall through
        case 2: b++;  // fall through
        case 3: b++;  // fall through
        case 4: b++;  // fall through
 default: ;
    }
    return b;
}
```

In the case, every `case` is fall through. 
So, in fact, the branchs is not identical in semantic.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to