From 5ef12b37f00f747f130664c655bb9b29dc10c816 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 13 May 2010 07:43:05 +0000 Subject: [PATCH] Update the types for warning option subgroup arrays to 'short', we have more than 127 groups so this was already failing given -fsigned-char. A subsequent to commit to TableGen will generate shorts for the arrays themselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103703 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Diagnostic.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index f48758b3be..2fd985f538 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -461,7 +461,7 @@ Diagnostic::getDiagnosticLevel(unsigned DiagID, unsigned DiagClass) const { struct WarningOption { const char *Name; const short *Members; - const char *SubGroups; + const short *SubGroups; }; #define GET_DIAG_ARRAYS @@ -491,9 +491,9 @@ static void MapGroupMembers(const WarningOption *Group, diag::Mapping Mapping, } // Enable/disable all subgroups along with this one. - if (const char *SubGroups = Group->SubGroups) { - for (; *SubGroups != (char)-1; ++SubGroups) - MapGroupMembers(&OptionTable[(unsigned char)*SubGroups], Mapping, Diags); + if (const short *SubGroups = Group->SubGroups) { + for (; *SubGroups != (short)-1; ++SubGroups) + MapGroupMembers(&OptionTable[(short)*SubGroups], Mapping, Diags); } } -- 2.40.0