aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/warn-duplicate-enum.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-07Sema: Don't crash when trying to emit a warning for a duplicate value in an ↵Benjamin Kramer1-0/+9
invalid enum. Fixes PR15693. A null check on a pointer returned from cast<> is a very dubious construct, do we have a checker for this somewhere? llvm-svn: 178975
2012-12-22Add back -Wduplicate-enum which I mistakenly removed.Ted Kremenek1-0/+92
This was removed with -Wunique-enum, which is still removed. The corresponding thread on cfe-comments for that warning is here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-September/024224.html If we get specific user feedback for -Wduplicate-enum we can evaluate whether or not to keep it. llvm-svn: 170974
2012-09-18Per discussion on cfe-dev, remove -Wunique-enums entirely. ThereTed Kremenek1-92/+0
is no compelling argument that this is a generally useful warning, and imposes a strong stylistic argument on code beyond what it was intended to find warnings in. llvm-svn: 164083
2012-08-30Add -Wduplicate-enum warning. Clang will emit this warning when an implicitlyRichard Trieu1-0/+92
initiated enum constant has the same value as another enum constant. For instance: enum test { A, B, C = -1, D, E = 1 }; Clang will warn that: A and D both have value 0 B and E both have value 1 A few exceptions are made to keep the noise down. Enum constants which are initialized to another enum constant, or an enum constant plus or minus 1 will not trigger this warning. Also, anonymous enums are not checked. llvm-svn: 162938