Open Quuxplusone opened 8 years ago
Attached file_26647.txt
(637 bytes, text/plain): Sample code illustrating bug
clang version: whatever Apple ships with Xcode 7.2.1 (7C1002).
Bugs against Apple XCode should be reported to Apple.
But, yes, this is part of a broad set of known limitations with the static analysis tools in LLVM (used for both diagnostics in Clang and for the Clang Static Analyzer infrastructure as well).
Some improvements were made in this space when the whole "goto fail" thing happened, to make -Wunreachable-code plausibly usable, but the broad work to really improve the conservative and aggressive assumptions about reachability (some diagnostics like unreachable code should be aggressive about reachability (they should assume that the default can be reached), while others like "shift of too large a distance" need to be conservative about reachability (so they don't flag code protected by, say "if sizeo(int) == 64")
file_26647.txt
(637 bytes, text/plain)