diff options
| author | Richard Trieu <rtrieu@google.com> | 2012-08-30 20:32:24 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2012-08-30 20:32:24 +0000 |
| commit | 73e306e548cd07f067ec4465a39b5fd3ea38dd0c (patch) | |
| tree | df118b6721c9ae8d779ae19a7efea9d548ef0cbc /llvm/utils/unittest/UnitTestMain/TestMain.cpp | |
| parent | 8bea83a866a799b10cff49cb46ac0a3b44c6eb03 (diff) | |
| download | bcm5719-llvm-73e306e548cd07f067ec4465a39b5fd3ea38dd0c.tar.gz bcm5719-llvm-73e306e548cd07f067ec4465a39b5fd3ea38dd0c.zip | |
Add -Wduplicate-enum warning. Clang will emit this warning when an implicitly
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
Diffstat (limited to 'llvm/utils/unittest/UnitTestMain/TestMain.cpp')
0 files changed, 0 insertions, 0 deletions

