Issue 62855
Summary [clang-tidy] false positive hicpp-multiway-paths-covered in known loop
Labels
Assignees
Reporter chrchr-github
    ~~~
#include <iostream>
void f() {
    for (int i = 0; i < 3; ++i) {
 switch (i) {
            case 0:
            std::cout << 0;
 break;
            case 1:
            std::cout << 1;
 break;
            case 2:
            std::cout << 2;
 break;
        }
    }
}
~~~
~~~
<source>:4:9: warning: potential uncovered code path; add a default label [hicpp-multiway-paths-covered]
        switch (i) {
 ^
~~~
https://godbolt.org/z/Yfd9Wbbj4
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to