aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-unique-enum.cpp
AgeCommit message (Collapse)Author
2012-09-18Per discussion on cfe-dev, remove -Wunique-enums entirely. ThereTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164083 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15Use llvm::APSInt::isSameValue to compare for the same value.Eric Christopher
Finishes rdar://11875995 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29Add a fix-it hint note to -Wunique-enum to suggest that the last element getsRichard Trieu
initialized with the next to last element to silence the warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159458 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-30Disable -Wunique-enum for anonymous enums.David Blaikie
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157713 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-30Add new -Wunique-enum which will warn on enums which all elements have theRichard Trieu
same value and were initialized with literals. Clang will warn on code like this: enum A { FIRST = 1, SECOND = 1 }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157666 91177308-0d34-0410-b5e6-96231b3b80d8