https://llvm.org/bugs/show_bug.cgi?id=31646
Bug ID: 31646 Summary: alpha.deadcode.UnreachableCode false positive Product: clang Version: 4.0 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Static Analyzer Assignee: kreme...@apple.com Reporter: bagn...@cs.unipr.it CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17842 --> https://llvm.org/bugs/attachment.cgi?id=17842&action=edit 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 $ -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs