[llvm-bugs] [Bug 46914] New: Inconsistency between
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 30 09:59:03 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46914
Bug ID: 46914
Summary: Inconsistency between
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: federico.kircheis at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
There is an inconsistency between "-Wshadow-all" and
"-Wshadow-uncaptured-local".
----
int main() {
int i = [](int i){ return i;}(1);
return i;
}
----
when compiling with "-Wshadow-all" it emits following diagnostic: "warning:
declaration shadows a local variable [-Wshadow-uncaptured-local]"
but when compiling with "-Wshadow-uncaptured-local", it does not emit any
diagnostic.
As reference:
https://godbolt.org/z/vxWdc4
--
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/20200730/92d410ea/attachment-0001.html>
More information about the llvm-bugs
mailing list