[LLVMbugs] [Bug 17864] New: Bogus "fallthrough annotation does not directly precede switch label" warning when [[clang::fallthrough]] is used in lambda
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Nov 9 09:08:13 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=17864
Bug ID: 17864
Summary: Bogus "fallthrough annotation does not directly
precede switch label" warning when
[[clang::fallthrough]] is used in lambda
Product: clang
Version: 3.3
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: arcata at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
This code incorrectly warns that the [[clang::falltrhrough]] annotation does
not precede a switch label:
void foo(int x) {
[&]{
switch (x) {
case 0:
foo(0);
[[clang::fallthrough]];
case 1:
foo(1);
}
}();
}
Remove the lambda [&]{ }() and the warning goes away.
--
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/20131109/2efc2a27/attachment.html>
More information about the llvm-bugs
mailing list