diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-07-19 03:59:51 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-07-19 03:59:51 +0000 |
| commit | ed1236d041fd41ec4b447581b21f021bd127a8f0 (patch) | |
| tree | fc4c9227d617904fdd5620336d87543e468444d3 /clang/lib/Basic | |
| parent | 5a7bbce587f26ef0bc81774b99530cc65754387e (diff) | |
| download | bcm5719-llvm-ed1236d041fd41ec4b447581b21f021bd127a8f0.tar.gz bcm5719-llvm-ed1236d041fd41ec4b447581b21f021bd127a8f0.zip | |
Remove unnecessary IsFirst variable from debug codde in GetDiagInfo.
llvm-svn: 186649
Diffstat (limited to 'clang/lib/Basic')
| -rw-r--r-- | clang/lib/Basic/DiagnosticIDs.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/clang/lib/Basic/DiagnosticIDs.cpp b/clang/lib/Basic/DiagnosticIDs.cpp index c2cb366e5e0..a703876da12 100644 --- a/clang/lib/Basic/DiagnosticIDs.cpp +++ b/clang/lib/Basic/DiagnosticIDs.cpp @@ -94,17 +94,13 @@ static const unsigned StaticDiagInfoSize = static const StaticDiagInfoRec *GetDiagInfo(unsigned DiagID) { // If assertions are enabled, verify that the StaticDiagInfo array is sorted. #ifndef NDEBUG - static bool IsFirst = true; - if (IsFirst) { - for (unsigned i = 1; i != StaticDiagInfoSize; ++i) { - assert(StaticDiagInfo[i-1].DiagID != StaticDiagInfo[i].DiagID && - "Diag ID conflict, the enums at the start of clang::diag (in " - "DiagnosticIDs.h) probably need to be increased"); - - assert(StaticDiagInfo[i-1] < StaticDiagInfo[i] && - "Improperly sorted diag info"); - } - IsFirst = false; + for (unsigned i = 1; i != StaticDiagInfoSize; ++i) { + assert(StaticDiagInfo[i-1].DiagID != StaticDiagInfo[i].DiagID && + "Diag ID conflict, the enums at the start of clang::diag (in " + "DiagnosticIDs.h) probably need to be increased"); + + assert(StaticDiagInfo[i-1] < StaticDiagInfo[i] && + "Improperly sorted diag info"); } #endif |

