summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-unique-enum.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use llvm::APSInt::isSameValue to compare for the same value.Eric Christopher2012-07-151-0/+6
| | | | | | Finishes rdar://11875995 llvm-svn: 160225
* Add a fix-it hint note to -Wunique-enum to suggest that the last element getsRichard Trieu2012-06-291-3/+8
| | | | | | initialized with the next to last element to silence the warning. llvm-svn: 159458
* Disable -Wunique-enum for anonymous enums.David Blaikie2012-05-301-1/+1
| | | | | | | | | | | | | This is a large class of false positives where anonymous enums are used to declare constants (see Clang's Diagnostics.h for example). A small number of true positives could probably be found in this bucket by still warning if the anonymous enum is used in a declarator (enum { ... } x;) but so far we don't believe this to be a source of significant benefit so I haven't bothered to preserve those cases. General offline review/acknowledgment by rtrieu. llvm-svn: 157713
* Add new -Wunique-enum which will warn on enums which all elements have theRichard Trieu2012-05-301-0/+16
same value and were initialized with literals. Clang will warn on code like this: enum A { FIRST = 1, SECOND = 1 }; llvm-svn: 157666
OpenPOWER on IntegriCloud