https://bugs.llvm.org/show_bug.cgi?id=36231
Bug ID: 36231
Summary: -Wswitch ignores [[maybe_unused]]
Product: clang
Version: 5.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: jva...@gmail.com
CC: llvm-bugs@lists.llvm.org
enum A
{
B,
C [[maybe_unused]]
};
void f(A a)
{
switch (a)
{
case B: break;
}
}
Results into:
<source>:9:13: warning: enumeration value 'C' not handled in switch [-Wswitch]
switch (a)
^
[[maybe_unused]] is allowed to be placed at this location and the only use case
I could come up with, does not work.
Some discussion about this can be found on
https://stackoverflow.com/q/48488635/2466431 although, no conclusion was
reached on this assumption being right or not.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs