[cfe-commits] [Patch] Add a warning to catch enums with all elements having the same value

Richard Trieu rtrieu at google.com
Tue May 15 16:10:42 PDT 2012


Add -Wunique-enum which will warn on enums with at least 2 elements such
that all elements are the same value.  This will catch enums such as:

enum A {
  FIRST = 1,
  SECOND = 1
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120515/65648768/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unique-enum.patch
Type: application/octet-stream
Size: 3801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120515/65648768/attachment.obj>


More information about the cfe-commits mailing list