[llvm-bugs] [Bug 43809] New: Missing unused variable and needless cast warning
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 25 16:10:28 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43809
Bug ID: 43809
Summary: Missing unused variable and needless cast warning
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: llvm at alex.lanin.de
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
Given:
struct S
{
S(int value)
: m_value(value) {}
int m_value;
};
void foo() {
S x{S{10}};
S y{10};
}
When compiling with -Weverything, I would have expected:
- unused variable x (available)
- unused variable y (available only when making it constexpr)
- useless cast within x (missing)
--
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/20191025/3985737b/attachment.html>
More information about the llvm-bugs
mailing list