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 | 9f6419f96d6cad3f7bd39f444cfc784ccbbdcd65 (patch) | |
tree | a5bd2198988baecaaddd4861c9c67b80af89be88 /lib/StaticAnalyzer/Core/CoreEngine.cpp | |
parent | d295970adc93ed4035d18df23673c2a72d124cc8 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CoreEngine.cpp')
0 files changed, 0 insertions, 0 deletions