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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs