]> granicus.if.org Git - clang/commit
[-Wunreachable-code] Prune out unreachable warnings where a 'break' is preceded by...
authorTed Kremenek <kremenek@apple.com>
Thu, 27 Feb 2014 00:24:08 +0000 (00:24 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 27 Feb 2014 00:24:08 +0000 (00:24 +0000)
commit05a09c8f63fb61abaeb1e3bb4da9db87aaa4ec8d
treef2f72dd4de4dbaa6b95b0ca5b52d4dcd7799126f
parent7e6444be66752afdbca2bf08ff2092bd64ee809d
[-Wunreachable-code] Prune out unreachable warnings where a 'break' is preceded by a call to a 'noreturn' function.

For example:

unreachable();
    break;

This code is idiomatic and defensive.  The fact that 'break' is
unreachable here is not interesting.  This occurs frequently
in LLVM/Clang itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202328 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ReachableCode.cpp
test/Sema/warn-unreachable.c