Open Quuxplusone opened 7 years ago
z.c
Created attachment 17842 Testcase allowing reproduction of the problem. $ cat z.c union U { int a; }; int foo(union U u) { return u.a ? 1 : 0; } $ clang-4.0 -cc1 -analyze -analyzer-checker=alpha.deadcode.UnreachableCode z.c z.c:6:20: warning: This statement is never executed return u.a ? 1 : 0; ^ 1 warning generated. $ clang-4.0 --version clang version 4.0.0-svn291446-1~exp1 (trunk) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/bin $
Attached z.c (69 bytes, text/x-csrc): Testcase allowing reproduction of the problem.
I could not reproduce the issue on the given code snippet. clang 10.x Can it be considered as resolved one?
z.c
(69 bytes, text/x-csrc)