[llvm-bugs] [Bug 48829] New: missing dead code diagnostic
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jan 20 21:48:42 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48829
Bug ID: 48829
Summary: missing dead code diagnostic
Product: clang
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: tiagomacarios at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
for the following code clang will not emit a diagnostic that that f() is never
called (dead code). msvc emits the diagnostic correctly.
https://godbolt.org/z/Y5n78v
```
void f();
void _(int num) {
switch (num)
{
case 1:
break;
f();
}
}
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210121/bb1b3d0b/attachment.html>
More information about the llvm-bugs
mailing list