http://llvm.org/bugs/show_bug.cgi?id=20950

Reid Kleckner <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |WORKSFORME

--- Comment #2 from Reid Kleckner <[email protected]> ---
We have a related warning under -Wimplicit-fallthrough, but it isn't on by
default due to false positives on existing code bases.


$ clang++ t.cpp -c -Wimplicit-fallthrough
t.cpp:8:5: warning: unannotated fall-through between switch labels
[-Wimplicit-fallthrough]
    case 2: m = 3;
    ^
t.cpp:8:5: note: insert '[[clang::fallthrough]];' to silence this warning
    case 2: m = 3;
    ^
    [[clang::fallthrough]];
t.cpp:8:5: note: insert 'break;' to avoid fall-through
    case 2: m = 3;
    ^
    break;
t.cpp:9:5: warning: unannotated fall-through between switch labels
[-Wimplicit-fallthrough]
    case 3: m = 4;
    ^
t.cpp:9:5: note: insert '[[clang::fallthrough]];' to silence this warning
    case 3: m = 4;
    ^
    [[clang::fallthrough]];
t.cpp:9:5: note: insert 'break;' to avoid fall-through
    case 3: m = 4;
    ^
    break;
t.cpp:10:5: warning: unannotated fall-through between switch labels
[-Wimplicit-fallthrough]
    case 4: m = 5;
    ^
t.cpp:10:5: note: insert '[[clang::fallthrough]];' to silence this warning
    case 4: m = 5;
    ^
    [[clang::fallthrough]];
t.cpp:10:5: note: insert 'break;' to avoid fall-through
    case 4: m = 5;
    ^
    break;
3 warnings generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to