summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-duplicate-enum.c
Commit message (Collapse)AuthorAgeFilesLines
* Sema: Don't crash when trying to emit a warning for a duplicate value in an ↵Benjamin Kramer2013-04-071-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
* Add back -Wduplicate-enum which I mistakenly removed.Ted Kremenek2012-12-221-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
* Per discussion on cfe-dev, remove -Wunique-enums entirely. ThereTed Kremenek2012-09-181-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
* Add -Wduplicate-enum warning. Clang will emit this warning when an implicitlyRichard Trieu2012-08-301-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
OpenPOWER on IntegriCloud