<a href="http://llvm.org/bugs/show_bug.cgi?id=6343" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=6343</a><div><br></div><div>Warn on enum elements that are assigned values already in use.  This is based on the misconception that elements not given a value will be given the next smallest, unused value.  Instead, elements are assigned 1 more than the previous value.  Some example code this warning will catch:</div>

<div><br></div><div>enum { A, B, C, Aref = A, count };</div><div>Both B and count will have value 1.</div><div><br></div><div>enum { A, B, C, D = -1, E, F };</div><div>A = E = 0</div><div>B = F = 1</div><div><br></div><div>
This warning found one such issue in LLVM that was fixed in r160465.</div>